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