Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE

Backs out https://github.com/servo/servo/pull/18809
This commit is contained in:
Gecko Backout 2017-10-19 21:26:51 +00:00 committed by moz-servo-sync
parent fe16c1d5c3
commit 11c64178d8
142 changed files with 1635 additions and 1685 deletions

View file

@ -7,7 +7,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use msg::constellation_msg::{Key, KeyModifiers};
#[cfg(target_os = "macos")]
use msg::constellation_msg::{ALT, SUPER};
use msg::constellation_msg::{Key, KeyModifiers, CONTROL};
use script::clipboard_provider::DummyClipboardContext;
use script::test::DOMString;
use script::textinput::{TextInput, TextPoint, Selection, Lines, Direction, SelectionDirection};
@ -428,29 +430,29 @@ fn test_navigation_keyboard_shortcuts() {
let mut textinput = text_input(Lines::Multiple, "hello áéc");
// Test that CMD + Right moves to the end of the current line.
textinput.handle_keydown_aux(None, Key::Right, KeyModifiers::SUPER);
textinput.handle_keydown_aux(None, Key::Right, SUPER);
assert_eq!(textinput.edit_point.index, 11);
// Test that CMD + Right moves to the beginning of the current line.
textinput.handle_keydown_aux(None, Key::Left, KeyModifiers::SUPER);
textinput.handle_keydown_aux(None, Key::Left, SUPER);
assert_eq!(textinput.edit_point.index, 0);
// Test that CTRL + ALT + E moves to the end of the current line also.
textinput.handle_keydown_aux(None, Key::E, KeyModifiers::CONTROL | KeyModifiers::ALT);
textinput.handle_keydown_aux(None, Key::E, CONTROL | ALT);
assert_eq!(textinput.edit_point.index, 11);
// Test that CTRL + ALT + A moves to the beginning of the current line also.
textinput.handle_keydown_aux(None, Key::A, KeyModifiers::CONTROL | KeyModifiers::ALT);
textinput.handle_keydown_aux(None, Key::A, CONTROL | ALT);
assert_eq!(textinput.edit_point.index, 0);
// Test that ALT + Right moves to the end of the word.
textinput.handle_keydown_aux(None, Key::Right, KeyModifiers::ALT);
textinput.handle_keydown_aux(None, Key::Right, ALT);
assert_eq!(textinput.edit_point.index, 5);
// Test that CTRL + ALT + F moves to the end of the word also.
textinput.handle_keydown_aux(None, Key::F, KeyModifiers::CONTROL | KeyModifiers::ALT);
textinput.handle_keydown_aux(None, Key::F, CONTROL | ALT);
assert_eq!(textinput.edit_point.index, 11);
// Test that ALT + Left moves to the end of the word.
textinput.handle_keydown_aux(None, Key::Left, KeyModifiers::ALT);
textinput.handle_keydown_aux(None, Key::Left, ALT);
assert_eq!(textinput.edit_point.index, 6);
// Test that CTRL + ALT + B moves to the end of the word also.
textinput.handle_keydown_aux(None, Key::B, KeyModifiers::CONTROL | KeyModifiers::ALT);
textinput.handle_keydown_aux(None, Key::B, CONTROL | ALT);
assert_eq!(textinput.edit_point.index, 0);
}
@ -509,9 +511,9 @@ fn test_textinput_set_content() {
#[test]
fn test_clipboard_paste() {
#[cfg(target_os = "macos")]
const MODIFIERS: KeyModifiers = KeyModifiers::SUPER;
const MODIFIERS: KeyModifiers = SUPER;
#[cfg(not(target_os = "macos"))]
const MODIFIERS: KeyModifiers = KeyModifiers::CONTROL;
const MODIFIERS: KeyModifiers = CONTROL;
let mut textinput = TextInput::new(Lines::Single,
DOMString::from("defg"),