|
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); |
|
7 |
|
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"); |
|
11 |
|
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"); |
|
16 |
|
17 waitForExplicitFinish(); |
|
18 gBrowser.selectedBrowser.addEventListener("load", function () { |
|
19 gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true); |
|
20 |
|
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"); |
|
23 |
|
24 gBrowser.removeCurrentTab(); |
|
25 finish(); |
|
26 }, true); |
|
27 } |