diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:00:38 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:00:38 -0500 |
commit | 8148615da179fdd60f19018e13b4e94b95609cc6 (patch) | |
tree | 771fccdd99fa3adf35fdd2c81d8197b415a89b91 /browser/base/content/test/urlbar/browser_urlbar_blanking.js | |
parent | 494802c1be7888025b95260d23db187467d2b9dd (diff) | |
download | UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.gz UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.lz UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.xz UXP-8148615da179fdd60f19018e13b4e94b95609cc6.zip |
Remove browser tests - Part 1: The Tests (except for experiments)
Diffstat (limited to 'browser/base/content/test/urlbar/browser_urlbar_blanking.js')
-rw-r--r-- | browser/base/content/test/urlbar/browser_urlbar_blanking.js | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/browser/base/content/test/urlbar/browser_urlbar_blanking.js b/browser/base/content/test/urlbar/browser_urlbar_blanking.js deleted file mode 100644 index 13660edab..000000000 --- a/browser/base/content/test/urlbar/browser_urlbar_blanking.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; - -add_task(function*() { - for (let page of gInitialPages) { - if (page == "about:newtab") { - // New tab preloading makes this a pain to test, so skip - continue; - } - let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, page); - ok(!gURLBar.value, "The URL bar should be empty if we load a plain " + page + " page."); - yield BrowserTestUtils.removeTab(tab); - } -}); - -add_task(function*() { - const URI = "http://www.example.com/browser/browser/base/content/test/urlbar/file_blank_but_not_blank.html"; - let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, URI); - is(gURLBar.value, URI, "The URL bar should match the URI"); - let browserLoaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser); - ContentTask.spawn(tab.linkedBrowser, null, function() { - content.document.querySelector('a').click(); - }); - yield browserLoaded; - ok(gURLBar.value.startsWith("javascript"), "The URL bar should have the JS URI"); - // When reloading, the javascript: uri we're using will throw an exception. - // That's deliberate, so we need to tell mochitest to ignore it: - SimpleTest.expectUncaughtException(true); - yield ContentTask.spawn(tab.linkedBrowser, null, function*() { - // This is sync, so by the time we return we should have changed the URL bar. - content.location.reload(); - }); - ok(!!gURLBar.value, "URL bar should not be blank."); - yield BrowserTestUtils.removeTab(tab); - SimpleTest.expectUncaughtException(false); -}); |