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 function test() {
2 const URI = "data:text/plain,bug562649";
3 browserDOMWindow.openURI(makeURI(URI),
4 null,
5 Ci.nsIBrowserDOMWindow.OPEN_NEWTAB,
6 Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
8 ok(XULBrowserWindow.isBusy, "window is busy loading a page");
9 is(gBrowser.userTypedValue, URI, "userTypedValue matches test URI");
10 is(gURLBar.value, URI, "location bar value matches test URI");
12 gBrowser.selectedTab = gBrowser.addTab();
13 gBrowser.removeCurrentTab();
14 is(gBrowser.userTypedValue, URI, "userTypedValue matches test URI after switching tabs");
15 is(gURLBar.value, URI, "location bar value matches test URI after switching tabs");
17 waitForExplicitFinish();
18 gBrowser.selectedBrowser.addEventListener("load", function () {
19 gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
21 is(gBrowser.userTypedValue, null, "userTypedValue is null as the page has loaded");
22 is(gURLBar.value, URI, "location bar value matches test URI as the page has loaded");
24 gBrowser.removeCurrentTab();
25 finish();
26 }, true);
27 }