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_bug590206.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_bug590206.js')
-rw-r--r-- | browser/base/content/test/general/browser_bug590206.js | 163 |
1 files changed, 0 insertions, 163 deletions
diff --git a/browser/base/content/test/general/browser_bug590206.js b/browser/base/content/test/general/browser_bug590206.js deleted file mode 100644 index f73d144e9..000000000 --- a/browser/base/content/test/general/browser_bug590206.js +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Test the identity mode UI for a variety of page types - */ - -"use strict"; - -const DUMMY = "browser/browser/base/content/test/general/dummy_page.html"; - -function loadNewTab(url) { - return BrowserTestUtils.openNewForegroundTab(gBrowser, url); -} - -function getIdentityMode() { - return document.getElementById("identity-box").className; -} - -function getConnectionState() { - gIdentityHandler.refreshIdentityPopup(); - return document.getElementById("identity-popup").getAttribute("connection"); -} - -// This test is slow on Linux debug e10s -requestLongerTimeout(2); - -add_task(function* test_webpage() { - let oldTab = gBrowser.selectedTab; - - let newTab = yield loadNewTab("http://example.com/" + DUMMY); - is(getIdentityMode(), "unknownIdentity", "Identity should be unknown"); - - gBrowser.selectedTab = oldTab; - is(getIdentityMode(), "unknownIdentity", "Identity should be unknown"); - - gBrowser.selectedTab = newTab; - is(getIdentityMode(), "unknownIdentity", "Identity should be unknown"); - - gBrowser.removeTab(newTab); -}); - -add_task(function* test_blank() { - let oldTab = gBrowser.selectedTab; - - let newTab = yield loadNewTab("about:blank"); - is(getIdentityMode(), "unknownIdentity", "Identity should be unknown"); - - gBrowser.selectedTab = oldTab; - is(getIdentityMode(), "unknownIdentity", "Identity should be unknown"); - - gBrowser.selectedTab = newTab; - is(getIdentityMode(), "unknownIdentity", "Identity should be unknown"); - - gBrowser.removeTab(newTab); -}); - -add_task(function* test_chrome() { - let oldTab = gBrowser.selectedTab; - - let newTab = yield loadNewTab("chrome://mozapps/content/extensions/extensions.xul"); - is(getConnectionState(), "file", "Connection should be file"); - - gBrowser.selectedTab = oldTab; - is(getIdentityMode(), "unknownIdentity", "Identity should be unknown"); - - gBrowser.selectedTab = newTab; - is(getConnectionState(), "file", "Connection should be file"); - - gBrowser.removeTab(newTab); -}); - -add_task(function* test_https() { - let oldTab = gBrowser.selectedTab; - - let newTab = yield loadNewTab("https://example.com/" + DUMMY); - is(getIdentityMode(), "verifiedDomain", "Identity should be verified"); - - gBrowser.selectedTab = oldTab; - is(getIdentityMode(), "unknownIdentity", "Identity should be unknown"); - - gBrowser.selectedTab = newTab; - is(getIdentityMode(), "verifiedDomain", "Identity should be verified"); - - gBrowser.removeTab(newTab); -}); - -add_task(function* test_addons() { - let oldTab = gBrowser.selectedTab; - - let newTab = yield loadNewTab("about:addons"); - is(getIdentityMode(), "chromeUI", "Identity should be chrome"); - - gBrowser.selectedTab = oldTab; - is(getIdentityMode(), "unknownIdentity", "Identity should be unknown"); - - gBrowser.selectedTab = newTab; - is(getIdentityMode(), "chromeUI", "Identity should be chrome"); - - gBrowser.removeTab(newTab); -}); - -add_task(function* test_file() { - let oldTab = gBrowser.selectedTab; - let fileURI = getTestFilePath(""); - - let newTab = yield loadNewTab(fileURI); - is(getConnectionState(), "file", "Connection should be file"); - - gBrowser.selectedTab = oldTab; - is(getIdentityMode(), "unknownIdentity", "Identity should be unknown"); - - gBrowser.selectedTab = newTab; - is(getConnectionState(), "file", "Connection should be file"); - - gBrowser.removeTab(newTab); -}); - -add_task(function* test_resource_uri() { - let oldTab = gBrowser.selectedTab; - let dataURI = "resource://gre/modules/Services.jsm"; - - let newTab = yield loadNewTab(dataURI); - - is(getConnectionState(), "file", "Connection should be file"); - - gBrowser.selectedTab = oldTab; - is(getIdentityMode(), "unknownIdentity", "Identity should be unknown"); - - gBrowser.selectedTab = newTab; - is(getConnectionState(), "file", "Connection should be file"); - - gBrowser.removeTab(newTab); -}); - -add_task(function* test_data_uri() { - let oldTab = gBrowser.selectedTab; - let dataURI = "data:text/html,hi" - - let newTab = yield loadNewTab(dataURI); - is(getIdentityMode(), "unknownIdentity", "Identity should be unknown"); - - gBrowser.selectedTab = oldTab; - is(getIdentityMode(), "unknownIdentity", "Identity should be unknown"); - - gBrowser.selectedTab = newTab; - is(getIdentityMode(), "unknownIdentity", "Identity should be unknown"); - - gBrowser.removeTab(newTab); -}); - -add_task(function* test_about_uri() { - let oldTab = gBrowser.selectedTab; - let aboutURI = "about:robots" - - let newTab = yield loadNewTab(aboutURI); - is(getConnectionState(), "file", "Connection should be file"); - - gBrowser.selectedTab = oldTab; - is(getIdentityMode(), "unknownIdentity", "Identity should be unknown"); - - gBrowser.selectedTab = newTab; - is(getConnectionState(), "file", "Connection should be file"); - - gBrowser.removeTab(newTab); -}); |