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.)
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 | } |