michael@0: function test() { michael@0: const URI = "data:text/plain,bug562649"; michael@0: browserDOMWindow.openURI(makeURI(URI), michael@0: null, michael@0: Ci.nsIBrowserDOMWindow.OPEN_NEWTAB, michael@0: Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL); michael@0: michael@0: ok(XULBrowserWindow.isBusy, "window is busy loading a page"); michael@0: is(gBrowser.userTypedValue, URI, "userTypedValue matches test URI"); michael@0: is(gURLBar.value, URI, "location bar value matches test URI"); michael@0: michael@0: gBrowser.selectedTab = gBrowser.addTab(); michael@0: gBrowser.removeCurrentTab(); michael@0: is(gBrowser.userTypedValue, URI, "userTypedValue matches test URI after switching tabs"); michael@0: is(gURLBar.value, URI, "location bar value matches test URI after switching tabs"); michael@0: michael@0: waitForExplicitFinish(); michael@0: gBrowser.selectedBrowser.addEventListener("load", function () { michael@0: gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true); michael@0: michael@0: is(gBrowser.userTypedValue, null, "userTypedValue is null as the page has loaded"); michael@0: is(gURLBar.value, URI, "location bar value matches test URI as the page has loaded"); michael@0: michael@0: gBrowser.removeCurrentTab(); michael@0: finish(); michael@0: }, true); michael@0: }