Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* Any copyright is dedicated to the Public Domain.
2 * http://creativecommons.org/publicdomain/zero/1.0/ */
4 function test() {
5 waitForExplicitFinish();
6 BrowserOpenTab();
8 let tab = gBrowser.selectedTab;
9 let browser = tab.linkedBrowser;
11 registerCleanupFunction(function () { gBrowser.removeTab(tab); });
13 whenBrowserLoaded(browser, function () {
14 browser.loadURI("http://example.com/");
16 whenBrowserLoaded(browser, function () {
17 ok(!gBrowser.canGoBack, "about:newtab wasn't added to the session history");
18 finish();
19 });
20 });
21 }
23 function whenBrowserLoaded(aBrowser, aCallback) {
24 if (aBrowser.contentDocument.readyState == "complete") {
25 executeSoon(aCallback);
26 return;
27 }
29 aBrowser.addEventListener("load", function onLoad() {
30 aBrowser.removeEventListener("load", onLoad, true);
31 executeSoon(aCallback);
32 }, true);
33 }