browser/base/content/test/general/browser_bug562649.js

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

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

mercurial