B2G/gecko/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_zoomrestore.js
// if there is already a zoom site pref for about:blank (bug 487656).
if there is already a zoom site pref for about:blank (bug 487656).
if there is already a zoom site pref for about : blank ( bug 487656 ) .
function test() {
  let pb = Cc["@mozilla.org/privatebrowsing;1"].
           getService(Ci.nsIPrivateBrowsingService);
  waitForExplicitFinish();
  let tabBlank = gBrowser.selectedTab;
  let blankBrowser = gBrowser.getBrowserForTab(tabBlank);
  blankBrowser.addEventListener("load", function() {
    blankBrowser.removeEventListener("load", arguments.callee, true);
    FullZoom.enlarge();
    isnot(ZoomManager.zoom, 1, "Zoom level for about:blank should be changed");
    pb.privateBrowsingEnabled = true;
    let tabAboutPB = gBrowser.selectedTab;
    let browserAboutPB = gBrowser.getBrowserForTab(tabAboutPB);
    browserAboutPB.addEventListener("load", function() {
      browserAboutPB.removeEventListener("load", arguments.callee, true);
      setTimeout(function() {
        is(ZoomManager.zoom, 1, "Zoom level for about:privatebrowsing should be reset");
        finishTest();
      }, 0);
    }, true);
  }, true);
  blankBrowser.loadURI("about:blank");
}
function test ( ) { let pb = Cc [ "@mozilla.org/privatebrowsing;1" ] . getService ( Ci . nsIPrivateBrowsingService ) ; waitForExplicitFinish ( ) ; let tabBlank = gBrowser . selectedTab ; let blankBrowser = gBrowser . getBrowserForTab ( tabBlank ) ; blankBrowser . addEventListener ( "load" , function ( ) { blankBrowser . removeEventListener ( "load" , arguments . callee , true ) ; FullZoom . enlarge ( ) ; isnot ( ZoomManager . zoom , 1 , "Zoom level for about:blank should be changed" ) ; pb . privateBrowsingEnabled = true ; let tabAboutPB = gBrowser . selectedTab ; let browserAboutPB = gBrowser . getBrowserForTab ( tabAboutPB ) ; browserAboutPB . addEventListener ( "load" , function ( ) { browserAboutPB . removeEventListener ( "load" , arguments . callee , true ) ; setTimeout ( function ( ) { is ( ZoomManager . zoom , 1 , "Zoom level for about:privatebrowsing should be reset" ) ; finishTest ( ) ; } , 0 ) ; } , true ) ; } , true ) ; blankBrowser . loadURI ( "about:blank" ) ; }
if there is already a zoom site pref for about:blank (bug 487656).
if there is already a zoom site pref for about : blank ( bug 487656 ) .
// initialization // change the zoom on the blank page // enter private browsing mode // make sure the zoom level is set to 1