B2G/gecko/toolkit/components/places/tests/browser/browser_bug680727.js
// listen to reload of neterror.
listen to reload of neterror.
listen to reload of neterror .
function reloadListener() {
  window.removeEventListener("DOMContentLoaded", reloadListener, false);
  ok(!Services.io.offline, "Services.io.offline is false.");
  is(gBrowser.contentDocument.documentURI, kUniqueURI.spec, 
     "Document URI is not the offline-error page, but the original URI.");
  waitForAsyncUpdates(function() {
    gAsyncHistory.isURIVisited(kUniqueURI, reloadAsyncListener);
  });
}
function reloadListener ( ) { window . removeEventListener ( "DOMContentLoaded" , reloadListener , false ) ; ok ( ! Services . io . offline , "Services.io.offline is false." ) ; is ( gBrowser . contentDocument . documentURI , kUniqueURI . spec , "Document URI is not the offline-error page, but the original URI." ) ; waitForAsyncUpdates ( function ( ) { gAsyncHistory . isURIVisited ( kUniqueURI , reloadAsyncListener ) ; } ) ; }
listen to reload of neterror.
listen to reload of neterror .
// This listener catches "DOMContentLoaded" on being called // nsIWPL::onLocationChange(...). That is right *AFTER* // IHistory::VisitURI(...) is called. // This is not an error page. // Check if global history remembers the successfully-requested URI.