Backed out changeset 5e25db36b720 (bug 1272012)

This commit is contained in:
Sebastian Hengst 2016-05-25 18:19:43 +02:00
parent 54b7c996a0
commit 1ebe7c3c5e
8 changed files with 30 additions and 57 deletions

View File

@ -50,9 +50,8 @@ skip-if = os == 'win' || os == 'linux'
[test_scroll.xul]
[test_scroll_caret.xul]
[test_selection.html]
skip-if = buildapp == 'mulet' || os == 'mac'
skip-if = buildapp == 'mulet'
[test_selection.xul]
skip-if = os == 'mac'
[test_selection_aria.html]
[test_statechange.html]
[test_text.html]
@ -61,4 +60,3 @@ skip-if = os == 'mac'
[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' || os == 'mac'
skip-if = android_version == '18'
[test_select_selectedOptions.html]
[test_select_validation.html]
[test_set_range_text.html]

View File

@ -73,21 +73,13 @@ select.addEventListener("change", function(aEvent) {
select.addEventListener("keyup", function() {
select.removeEventListener("keyup", arguments.callee, false);
if (navigator.platform.indexOf("Mac") == -1) {
select.blur(); // trigger the change
}
select.blur();
}, false);
select.addEventListener("focus", function() {
select.removeEventListener("focus", arguments.callee, false);
SimpleTest.executeSoon(function () {
if (navigator.platform.indexOf("Mac") == 0) {
synthesizeKey("VK_DOWN", {}); // open the dropdown menu
synthesizeKey("VK_DOWN", {}); // select next option
synthesizeKey("VK_RETURN", {}); // trigger the change, close the menu
} else {
synthesizeKey("VK_DOWN", {}); // select next option (w. closed menu)
}
synthesizeKey("VK_DOWN", {});
});
}, false);

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 || 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)
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)
[test_bug353539.html]
[test_bug365410.html]
[test_bug378670.html]

View File

@ -91,24 +91,20 @@ SimpleTest.waitForFocus(function() {
setTimeout(function(){sel[2].focus()},0);
}, false);
sel[2].addEventListener('focus', function() {
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");
}
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");
setTimeout(function(){SimpleTest.finish()},0);
}, false);
sel[0].focus();

View File

@ -271,20 +271,16 @@ function runTests()
[ false, true ].forEach(function (consume) {
doPreventDefault = consume;
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_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);
}
} else {
todo(false, "Make this test work on OSX");
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++) {

View File

@ -49,12 +49,8 @@ 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);
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");
}
select_test("three", three_1, true);
select_test("three", three_2, false);
SimpleTest.finish();
});
}

View File

@ -29,11 +29,6 @@ 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.