Bug 1272012 - Tweak or disable a few tests for <select size=1> Up/Down key behavior on OSX.
authorMats Palmgren <mats@mozilla.com>
Wed, 25 May 2016 21:52:36 +0200
changeset 299042 bd4592d84a9ed24a80a3df7707d3c07284765f2d
parent 299041 e9c2a7a3f9ca4b47844b20f0d2b39cd8d6056248
child 299043 69aaee1090d832a21fcd322f1a1be0e95b99bfbf
push id30288
push userryanvm@gmail.com
push dateThu, 26 May 2016 15:04:54 +0000
treeherdermozilla-central@56e5195bef5b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1272012
milestone49.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 1272012 - Tweak or disable a few tests for <select size=1> Up/Down key behavior on OSX.
accessible/tests/mochitest/events/a11y.ini
dom/html/test/forms/mochitest.ini
dom/html/test/mochitest.ini
layout/forms/test/mochitest.ini
layout/forms/test/test_bug672810.html
layout/forms/test/test_bug935876.html
layout/forms/test/test_bug961363.html
layout/forms/test/test_select_prevent_default.html
--- a/accessible/tests/mochitest/events/a11y.ini
+++ b/accessible/tests/mochitest/events/a11y.ini
@@ -45,18 +45,20 @@ skip-if = os == 'win' || os == 'linux'
 [test_menu.xul]
 [test_mutation.html]
 [test_mutation.xhtml]
 [test_namechange.xul]
 [test_namechange.html]
 [test_scroll.xul]
 [test_scroll_caret.xul]
 [test_selection.html]
-skip-if = buildapp == 'mulet'
+skip-if = buildapp == 'mulet' || os == 'mac'
 [test_selection.xul]
+skip-if = os == 'mac'
 [test_selection_aria.html]
 [test_statechange.html]
 [test_text.html]
 [test_text_alg.html]
 [test_textattrchange.html]
 [test_textselchange.html]
 [test_tree.xul]
 [test_valuechange.html]
+skip-if = os == 'mac'
--- a/dom/html/test/forms/mochitest.ini
+++ b/dom/html/test/forms/mochitest.ini
@@ -82,17 +82,17 @@ skip-if = buildapp == 'mulet'
 [test_pattern_attribute.html]
 [test_progress_element.html]
 [test_radio_in_label.html]
 [test_radio_radionodelist.html]
 [test_required_attribute.html]
 [test_restore_form_elements.html]
 [test_save_restore_radio_groups.html]
 [test_select_change_event.html]
-skip-if = android_version == '18'
+skip-if = android_version == '18' || os == 'mac'
 [test_select_selectedOptions.html]
 [test_select_validation.html]
 [test_set_range_text.html]
 [test_step_attribute.html]
 [test_stepup_stepdown.html]
 [test_textarea_attributes_reflection.html]
 [test_validation.html]
 skip-if = buildapp == 'b2g' # b2g(374 total, bug 901848, no keygen support) b2g-debug(374 total, bug 901848, no keygen support) b2g-desktop(374 total, bug 901848, no keygen support)
--- a/dom/html/test/mochitest.ini
+++ b/dom/html/test/mochitest.ini
@@ -367,17 +367,17 @@ skip-if = buildapp == 'mulet' # TC: Bug 
 [test_bug612730.html]
 skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' # b2g(form control not selected/checked with synthesizeMouse, also fails on Android) b2g-debug(form control not selected/checked with synthesizeMouse, also fails on Android) b2g-desktop(form control not selected/checked with synthesizeMouse, also fails on Android)
 [test_bug613113.html]
 skip-if = buildapp == 'b2g' # b2g(bug 587671, need an invalidformsubmit observer) b2g-debug(bug 587671, need an invalidformsubmit observer) b2g-desktop(bug 587671, need an invalidformsubmit observer)
 [test_bug613722.html]
 [test_bug613979.html]
 [test_bug615595.html]
 [test_bug615833.html]
-skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT # b2g(form control not selected/checked with synthesizeMouse, also fails on Android) b2g-debug(form control not selected/checked with synthesizeMouse, also fails on Android) b2g-desktop(form control not selected/checked with synthesizeMouse, also fails on Android)
+skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || os == 'mac' #TIMED_OUT # b2g(form control not selected/checked with synthesizeMouse, also fails on Android) b2g-debug(form control not selected/checked with synthesizeMouse, also fails on Android) b2g-desktop(form control not selected/checked with synthesizeMouse, also fails on Android) osx(bug 1275664)
 [test_bug617528.html]
 [test_bug618948.html]
 skip-if = buildapp == 'b2g' # b2g(bug 587671, need an invalidformsubmit observer) b2g-debug(bug 587671, need an invalidformsubmit observer) b2g-desktop(bug 587671, need an invalidformsubmit observer)
 [test_bug619278.html]
 skip-if = buildapp == 'b2g' # b2g(bug 587671, need an invalidformsubmit observer) b2g-debug(bug 587671, need an invalidformsubmit observer) b2g-desktop(bug 587671, need an invalidformsubmit observer)
 [test_bug622558.html]
 [test_bug622597.html]
 skip-if = buildapp == 'b2g' # b2g(bug 587671, need an invalidformsubmit observer) b2g-debug(bug 587671, need an invalidformsubmit observer) b2g-desktop(bug 587671, need an invalidformsubmit observer)
--- a/layout/forms/test/mochitest.ini
+++ b/layout/forms/test/mochitest.ini
@@ -5,17 +5,17 @@ support-files =
   bug564115_window.html
 
 [test_bug231389.html]
 [test_bug287446.html]
 skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #bug 947789
 [test_bug345267.html]
 [test_bug346043.html]
 [test_bug348236.html]
-skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(select form control popup) b2g-debug(select form control popup) b2g-desktop(select form control popup)
+skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s || os == 'mac' # b2g(select form control popup) b2g-debug(select form control popup) b2g-desktop(select form control popup) mac(select form control popup behavior is different)
 [test_bug353539.html]
 [test_bug365410.html]
 [test_bug378670.html]
 skip-if = toolkit == 'android' #TIMED_OUT
 [test_bug402198.html]
 [test_bug411236.html]
 [test_bug446663.html]
 skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(needs copy support) b2g-debug(needs copy support) b2g-desktop(needs copy support)
--- a/layout/forms/test/test_bug672810.html
+++ b/layout/forms/test/test_bug672810.html
@@ -86,30 +86,34 @@ SimpleTest.waitForFocus(function() {
     ok(!s[1].selected,s.id + ": CTRL+SHIFT+DOWN deselected 2nd option");
     synthesizeKey(' ', {ctrlKey: true, shiftKey: true});
     is(s.selectedIndex,3, s.id + ": 4th option is still selected");
     synthesizeKey(' ', {ctrlKey: true, shiftKey: true});
     is(s.selectedIndex,3, s.id + ": 4th option is still selected");
     setTimeout(function(){sel[2].focus()},0);
   }, false);
   sel[2].addEventListener('focus', function() {
-    s = sel[2];
-    s.removeEventListener('focus', arguments.callee, false);
-    synthesizeKey('VK_DOWN', {});
-    is(s.selectedIndex,1, s.id + ": initial DOWN selects 2nd option");
-    synthesizeKey('VK_DOWN', {ctrlKey: true});
-    is(s.selectedIndex,2, s.id + ": 3rd option is selected");
-    ok(!s[1].selected,s.id + ": CTRL+DOWN deselected 2nd option");
-    synthesizeKey('VK_DOWN', {ctrlKey: true, shiftKey: true});
-    is(s.selectedIndex,3, s.id + ": 4th option is selected");
-    ok(!s[2].selected,s.id + ": CTRL+SHIFT+DOWN deselected 3rd option");
-    synthesizeKey(' ', {ctrlKey: true, shiftKey: true});
-    is(s.selectedIndex,3, s.id + ": 4th option is still selected");
-    synthesizeKey(' ', {ctrlKey: true, shiftKey: true});
-    is(s.selectedIndex,3, s.id + ": 4th option is still selected");
+    if (navigator.platform.indexOf("Mac") == -1) {
+      s = sel[2];
+      s.removeEventListener('focus', arguments.callee, false);
+      synthesizeKey('VK_DOWN', {});
+      is(s.selectedIndex,1, s.id + ": initial DOWN selects 2nd option");
+      synthesizeKey('VK_DOWN', {ctrlKey: true});
+      is(s.selectedIndex,2, s.id + ": 3rd option is selected");
+      ok(!s[1].selected,s.id + ": CTRL+DOWN deselected 2nd option");
+      synthesizeKey('VK_DOWN', {ctrlKey: true, shiftKey: true});
+      is(s.selectedIndex,3, s.id + ": 4th option is selected");
+      ok(!s[2].selected,s.id + ": CTRL+SHIFT+DOWN deselected 3rd option");
+      synthesizeKey(' ', {ctrlKey: true, shiftKey: true});
+      is(s.selectedIndex,3, s.id + ": 4th option is still selected");
+      synthesizeKey(' ', {ctrlKey: true, shiftKey: true});
+      is(s.selectedIndex,3, s.id + ": 4th option is still selected");
+    } else {
+      todo(false, "Make this test work on OSX");
+    }
     setTimeout(function(){SimpleTest.finish()},0);
   }, false);
   sel[0].focus();
 });
 
 </script>
 </pre>
 </body>
--- a/layout/forms/test/test_bug935876.html
+++ b/layout/forms/test/test_bug935876.html
@@ -266,26 +266,30 @@ function runTests()
   combobox.addEventListener("keydown", onKeydown, false);
   combobox.addEventListener("keypress", onKeypress, false);
   SpecialPowers.addSystemEventListener(combobox, "keydown", onkeydownInSystemEventGroup, false);
 
   combobox.focus();
 
   [ false, true ].forEach(function (consume) {
     doPreventDefault = consume;
-    for (var i = 0; i < combobox.options.length + 1; i++) {
-      reset()
-      synthesizeKey("VK_DOWN", {});
-      check(true, "DownArrow key on combobox #" + i);
-    }
+    if (!kIsMac) {
+      for (var i = 0; i < combobox.options.length + 1; i++) {
+        reset()
+        synthesizeKey("VK_DOWN", {});
+        check(true, "DownArrow key on combobox #" + i);
+      }
 
-    for (var i = 0; i < combobox.options.length + 1; i++) {
-      reset()
-      synthesizeKey("VK_UP", {});
-      check(true, "UpArrow key on combobox #" + i);
+      for (var i = 0; i < combobox.options.length + 1; i++) {
+        reset()
+        synthesizeKey("VK_UP", {});
+        check(true, "UpArrow key on combobox #" + i);
+      }
+    } else {
+      todo(false, "Make this test work on OSX");
     }
 
     for (var i = 0; i < combobox.options.length + 1; i++) {
       reset()
       synthesizeKey("VK_RIGHT", {});
       check(true, "RightArrow key on combobox #" + i);
     }
 
--- a/layout/forms/test/test_bug961363.html
+++ b/layout/forms/test/test_bug961363.html
@@ -44,18 +44,22 @@ https://bugzilla.mozilla.org/show_bug.cg
           var sel = Array.prototype.slice.call(element.options).map(function(o){return o.selected})
           is(""+sel, ""+data.s, "selected options match after CTRL+SPACE (after testing CTRL+key " + key + ") for (id: " + id + ")");
           previousValue = element.value;
           });
       };
       select_test("one", one, false);
       select_test("two", two_1, true);
       select_test("two", two_2, false);
-      select_test("three", three_1, true);
-      select_test("three", three_2, false);
+      if (navigator.platform.indexOf("Mac") == -1) {
+        select_test("three", three_1, true);
+        select_test("three", three_2, false);
+      } else {
+        todo(false, "Make these tests work on OSX");
+      }
       SimpleTest.finish();
     });
   }
 </script>
 </head>
 <body onload="test();">
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=961363">Mozilla Bug 961363</a>
 <div>
--- a/layout/forms/test/test_select_prevent_default.html
+++ b/layout/forms/test/test_select_prevent_default.html
@@ -24,16 +24,21 @@ https://bugzilla.mozilla.org/show_bug.cg
     SpecialPowers.pushPrefEnv({"set":[["snav.enabled", false]]}, runTest);
   }
 
   function runTest() {
     document.getElementById("keydown").addEventListener("keydown", preventDefault);
     document.getElementById("keypress").addEventListener("keypress", preventDefault);
 
     SimpleTest.waitForFocus(function() {
+      if (navigator.platform.indexOf("Mac") == 0) {
+        todo(false, "Make this test work on OSX");
+        SimpleTest.finish();
+        return;
+      }
       var testData = [ "one", "two", "three", "four", "keydown", "keypress" ];
 
       // The order of the keys in otherKeys is important for the test to function properly.
       var otherKeys = [ "DOWN", "UP", "RIGHT", "LEFT", "PAGE_DOWN", "PAGE_UP",
                         "END", "HOME" ];
 
       testData.forEach(function(id) {
         var element = document.getElementById(id);