summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/siteIdentity
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-02-03 06:00:38 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-02-03 06:00:38 -0500
commit8148615da179fdd60f19018e13b4e94b95609cc6 (patch)
tree771fccdd99fa3adf35fdd2c81d8197b415a89b91 /browser/base/content/test/siteIdentity
parent494802c1be7888025b95260d23db187467d2b9dd (diff)
downloadUXP-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/siteIdentity')
-rw-r--r--browser/base/content/test/siteIdentity/browser.ini8
-rw-r--r--browser/base/content/test/siteIdentity/browser_identityBlock_focus.js62
-rw-r--r--browser/base/content/test/siteIdentity/browser_identityPopup_focus.js27
-rw-r--r--browser/base/content/test/siteIdentity/head.js6
4 files changed, 0 insertions, 103 deletions
diff --git a/browser/base/content/test/siteIdentity/browser.ini b/browser/base/content/test/siteIdentity/browser.ini
deleted file mode 100644
index 6ad3668fd..000000000
--- a/browser/base/content/test/siteIdentity/browser.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[DEFAULT]
-support-files =
- head.js
-
-[browser_identityBlock_focus.js]
-skip-if = os == 'mac' # Bug 1334418 (try only)
-support-files = ../general/permissions.html
-[browser_identityPopup_focus.js]
diff --git a/browser/base/content/test/siteIdentity/browser_identityBlock_focus.js b/browser/base/content/test/siteIdentity/browser_identityBlock_focus.js
deleted file mode 100644
index e1e4e537a..000000000
--- a/browser/base/content/test/siteIdentity/browser_identityBlock_focus.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Tests that the identity block can be reached via keyboard
- * shortcuts and that it has the correct tab order.
- */
-
-const TEST_PATH = getRootDirectory(gTestPath).replace("chrome://mochitests/content", "https://example.com");
-const PERMISSIONS_PAGE = TEST_PATH + "permissions.html";
-
-function synthesizeKeyAndWaitForFocus(element, keyCode, options) {
- let focused = BrowserTestUtils.waitForEvent(element, "focus");
- EventUtils.synthesizeKey(keyCode, options);
- return focused;
-}
-
-// Checks that the identity block is the next element after the urlbar
-// to be focused if there are no active notification anchors.
-add_task(function* testWithoutNotifications() {
- yield BrowserTestUtils.withNewTab("https://example.com", function*() {
- yield synthesizeKeyAndWaitForFocus(gURLBar, "l", {accelKey: true})
- is(document.activeElement, gURLBar.inputField, "urlbar should be focused");
- yield synthesizeKeyAndWaitForFocus(gIdentityHandler._identityBox, "VK_TAB", {shiftKey: true})
- is(document.activeElement, gIdentityHandler._identityBox,
- "identity block should be focused");
- });
-});
-
-// Checks that when there is a notification anchor, it will receive
-// focus before the identity block.
-add_task(function* testWithoutNotifications() {
-
- yield BrowserTestUtils.withNewTab(PERMISSIONS_PAGE, function*(browser) {
- let popupshown = BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popupshown");
- // Request a permission;
- BrowserTestUtils.synthesizeMouseAtCenter("#geo", {}, browser);
- yield popupshown;
-
- yield synthesizeKeyAndWaitForFocus(gURLBar, "l", {accelKey: true})
- is(document.activeElement, gURLBar.inputField, "urlbar should be focused");
- let geoIcon = document.getElementById("geo-notification-icon");
- yield synthesizeKeyAndWaitForFocus(geoIcon, "VK_TAB", {shiftKey: true})
- is(document.activeElement, geoIcon, "notification anchor should be focused");
- yield synthesizeKeyAndWaitForFocus(gIdentityHandler._identityBox, "VK_TAB", {shiftKey: true})
- is(document.activeElement, gIdentityHandler._identityBox,
- "identity block should be focused");
- });
-});
-
-// Checks that with invalid pageproxystate the identity block is ignored.
-add_task(function* testInvalidPageProxyState() {
- yield BrowserTestUtils.withNewTab("about:blank", function*(browser) {
- // Loading about:blank will automatically focus the urlbar, which, however, can
- // race with the test code. So we only send the shortcut if the urlbar isn't focused yet.
- if (document.activeElement != gURLBar.inputField) {
- yield synthesizeKeyAndWaitForFocus(gURLBar, "l", {accelKey: true})
- }
- is(document.activeElement, gURLBar.inputField, "urlbar should be focused");
- yield synthesizeKeyAndWaitForFocus(gBrowser.getTabForBrowser(browser), "VK_TAB", {shiftKey: true})
- isnot(document.activeElement, gIdentityHandler._identityBox,
- "identity block should not be focused");
- // Restore focus to the url bar.
- gURLBar.focus();
- });
-});
diff --git a/browser/base/content/test/siteIdentity/browser_identityPopup_focus.js b/browser/base/content/test/siteIdentity/browser_identityPopup_focus.js
deleted file mode 100644
index eea06f079..000000000
--- a/browser/base/content/test/siteIdentity/browser_identityPopup_focus.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Tests the focus behavior of the identity popup. */
-
-// Access the identity popup via mouseclick. Focus should not be moved inside.
-add_task(function* testIdentityPopupFocusClick() {
- yield SpecialPowers.pushPrefEnv({"set": [["accessibility.tabfocus", 7]]});
- yield BrowserTestUtils.withNewTab("https://example.com", function*() {
- let shown = BrowserTestUtils.waitForEvent(gIdentityHandler._identityPopup, "popupshown");
- EventUtils.synthesizeMouseAtCenter(gIdentityHandler._identityBox, {});
- yield shown;
- isnot(Services.focus.focusedElement, document.getElementById("identity-popup-security-expander"));
- });
-});
-
-// Access the identity popup via keyboard. Focus should be moved inside.
-add_task(function* testIdentityPopupFocusKeyboard() {
- yield SpecialPowers.pushPrefEnv({"set": [["accessibility.tabfocus", 7]]});
- yield BrowserTestUtils.withNewTab("https://example.com", function*() {
- let focused = BrowserTestUtils.waitForEvent(gIdentityHandler._identityBox, "focus");
- gIdentityHandler._identityBox.focus();
- yield focused;
- let shown = BrowserTestUtils.waitForEvent(gIdentityHandler._identityPopup, "popupshown");
- EventUtils.synthesizeKey(" ", {});
- yield shown;
- is(Services.focus.focusedElement, document.getElementById("identity-popup-security-expander"));
- });
-});
-
diff --git a/browser/base/content/test/siteIdentity/head.js b/browser/base/content/test/siteIdentity/head.js
deleted file mode 100644
index 12a0547ee..000000000
--- a/browser/base/content/test/siteIdentity/head.js
+++ /dev/null
@@ -1,6 +0,0 @@
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Task",
- "resource://gre/modules/Task.jsm");