mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 21:58:41 +02:00
MozReview-Commit-ID: CRYxu7copKb --HG-- extra : rebase_source : bc176c5e6890ffc6a4e26cb9bc9d441d9486ce7b
24 lines
1 KiB
JavaScript
24 lines
1 KiB
JavaScript
function test() {
|
|
const URI = "data:text/plain,bug562649";
|
|
window.browserDOMWindow.openURI(makeURI(URI),
|
|
null,
|
|
Ci.nsIBrowserDOMWindow.OPEN_NEWTAB,
|
|
Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
|
|
|
|
is(gBrowser.userTypedValue, URI, "userTypedValue matches test URI");
|
|
is(gURLBar.value, URI, "location bar value matches test URI");
|
|
|
|
gBrowser.selectedTab = gBrowser.addTab();
|
|
gBrowser.removeCurrentTab({ skipPermitUnload: true });
|
|
is(gBrowser.userTypedValue, URI, "userTypedValue matches test URI after switching tabs");
|
|
is(gURLBar.value, URI, "location bar value matches test URI after switching tabs");
|
|
|
|
waitForExplicitFinish();
|
|
BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
|
|
is(gBrowser.userTypedValue, null, "userTypedValue is null as the page has loaded");
|
|
is(gURLBar.value, URI, "location bar value matches test URI as the page has loaded");
|
|
|
|
gBrowser.removeCurrentTab({ skipPermitUnload: true });
|
|
finish();
|
|
});
|
|
}
|