B2G/gecko/toolkit/components/places/tests/browser/browser_bug680727.js
// listen to loading the neterror page. (offline mode)
listen to loading the neterror page. (offline mode)
listen to loading the neterror page . ( offline mode )
function errorListener() {
  if(content.location == "about:blank") {
    info("got about:blank, which is expected once, so return");
    return;
  }
  window.removeEventListener("DOMContentLoaded", errorListener, false);
  ok(Services.io.offline, "Services.io.offline is true.");
  is(gBrowser.contentDocument.documentURI.substring(0, 27),
     "about:neterror?e=netOffline",
     "Document URI is the error page.");
  is(content.location.href, kUniqueURI.spec,
     "Docshell URI is the original URI.");
  waitForAsyncUpdates(function() {
    gAsyncHistory.isURIVisited(kUniqueURI, errorAsyncListener);
  });
}
function errorListener ( ) { if ( content . location == "about:blank" ) { info ( "got about:blank, which is expected once, so return" ) ; return ; } window . removeEventListener ( "DOMContentLoaded" , errorListener , false ) ; ok ( Services . io . offline , "Services.io.offline is true." ) ; is ( gBrowser . contentDocument . documentURI . substring ( 0 , 27 ) , "about:neterror?e=netOffline" , "Document URI is the error page." ) ; is ( content . location . href , kUniqueURI . spec , "Docshell URI is the original URI." ) ; waitForAsyncUpdates ( function ( ) { gAsyncHistory . isURIVisited ( kUniqueURI , errorAsyncListener ) ; } ) ; }
listen to loading the neterror page.
listen to loading the neterror page .
// This is an error page. // But location bar should show the original request. // Global history does not record URI of a failed request.