Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
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 }