Bug 1334418 - Enable full tab focus on OSX in identityBlock_focus tests. r=Gijs
authorJohann Hofmann <jhofmann@mozilla.com>
Tue, 31 Jan 2017 22:44:14 +0100
changeset 331967 6f8b490681e8699a992134f881a7d5ed245ac57e
parent 331966 feb30777c832e60eb05a15d8c01ce01ba35da426
child 331968 dd429b170253502460950d8123945ed763850581
push id36741
push userjhofmann@mozilla.com
push dateWed, 01 Feb 2017 16:23:31 +0000
treeherderautoland@6f8b490681e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1334418
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1334418 - Enable full tab focus on OSX in identityBlock_focus tests. r=Gijs MozReview-Commit-ID: 54ieeV15tDq
browser/base/content/test/siteIdentity/browser.ini
browser/base/content/test/siteIdentity/browser_identityBlock_focus.js
--- a/browser/base/content/test/siteIdentity/browser.ini
+++ b/browser/base/content/test/siteIdentity/browser.ini
@@ -1,7 +1,6 @@
 [DEFAULT]
 support-files =
   head.js
 
 [browser_identityBlock_focus.js]
-skip-if = os == 'mac' # Bug 1334418 (try only)
 support-files = ../general/permissions.html
--- a/browser/base/content/test/siteIdentity/browser_identityBlock_focus.js
+++ b/browser/base/content/test/siteIdentity/browser_identityBlock_focus.js
@@ -9,29 +9,30 @@ function synthesizeKeyAndWaitForFocus(el
   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 SpecialPowers.pushPrefEnv({"set": [["accessibility.tabfocus", 7]]});
   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 SpecialPowers.pushPrefEnv({"set": [["accessibility.tabfocus", 7]]});
   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");
@@ -41,16 +42,17 @@ add_task(function* testWithoutNotificati
     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 SpecialPowers.pushPrefEnv({"set": [["accessibility.tabfocus", 7]]});
   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})