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/general/browser_invalid_uri_back_forward_manipulation.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/general/browser_invalid_uri_back_forward_manipulation.js')
-rw-r--r-- | browser/base/content/test/general/browser_invalid_uri_back_forward_manipulation.js | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/browser/base/content/test/general/browser_invalid_uri_back_forward_manipulation.js b/browser/base/content/test/general/browser_invalid_uri_back_forward_manipulation.js deleted file mode 100644 index 8e69e781b..000000000 --- a/browser/base/content/test/general/browser_invalid_uri_back_forward_manipulation.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; - - -/** - * Verify that loading an invalid URI does not clobber a previously-loaded page's history - * entry, but that the invalid URI gets its own history entry instead. We're checking this - * using nsIWebNavigation's canGoBack, as well as actually going back and then checking - * canGoForward. - */ -add_task(function* checkBackFromInvalidURI() { - yield pushPrefs(["keyword.enabled", false]); - let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:robots", true); - gURLBar.value = "::2600"; - gURLBar.focus(); - - let promiseErrorPageLoaded = new Promise(resolve => { - tab.linkedBrowser.addEventListener("DOMContentLoaded", function onLoad() { - tab.linkedBrowser.removeEventListener("DOMContentLoaded", onLoad, false, true); - resolve(); - }, false, true); - }); - EventUtils.synthesizeKey("VK_RETURN", {}); - yield promiseErrorPageLoaded; - - ok(gBrowser.webNavigation.canGoBack, "Should be able to go back"); - if (gBrowser.webNavigation.canGoBack) { - // Can't use DOMContentLoaded here because the page is bfcached. Can't use pageshow for - // the error page because it doesn't seem to fire for those. - let promiseOtherPageLoaded = BrowserTestUtils.waitForEvent(tab.linkedBrowser, "pageshow", false, - // Be paranoid we *are* actually seeing this other page load, not some kind of race - // for if/when we do start firing pageshow for the error page... - function(e) { return gBrowser.currentURI.spec == "about:robots" } - ); - gBrowser.goBack(); - yield promiseOtherPageLoaded; - ok(gBrowser.webNavigation.canGoForward, "Should be able to go forward from previous page."); - } - yield BrowserTestUtils.removeTab(tab); -}); |