Bug 1272012 - Tweak or disable a few tests for <select size=1> Up/Down key behavior on OSX.

This commit is contained in:
Mats Palmgren 2016-05-25 21:52:36 +02:00
parent 551e9fc180
commit df2b4d3bdd
8 changed files with 48 additions and 29 deletions

View File

@ -50,8 +50,9 @@ skip-if = os == 'win' || os == 'linux'
[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]
@ -60,3 +61,4 @@ skip-if = buildapp == 'mulet'
[test_textselchange.html]
[test_tree.xul]
[test_valuechange.html]
skip-if = os == 'mac'

View File

@ -87,7 +87,7 @@ skip-if = buildapp == 'mulet'
[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]

View File

@ -372,7 +372,7 @@ skip-if = buildapp == 'b2g' # b2g(bug 587671, need an invalidformsubmit observer
[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)

View File

@ -10,7 +10,7 @@ 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]

View File

@ -91,20 +91,24 @@ SimpleTest.waitForFocus(function() {
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();

View File

@ -271,16 +271,20 @@ function runTests()
[ 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++) {

View File

@ -49,8 +49,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=961363
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();
});
}

View File

@ -29,6 +29,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=291082
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.