mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Revert "Correct default Selectionstart and SelectionEnd"
This reverts commit b2c1f89b93
.
This commit is contained in:
parent
267f9db314
commit
b517410a34
8 changed files with 86 additions and 131 deletions
|
@ -27,7 +27,7 @@ fn test_set_content_ignores_max_length() {
|
|||
Lines::Single, DOMString::from(""), DummyClipboardContext::new(""), Some(1), None, SelectionDirection::None
|
||||
);
|
||||
|
||||
textinput.set_content(DOMString::from("mozilla rocks"), true);
|
||||
textinput.set_content(DOMString::from("mozilla rocks"));
|
||||
assert_eq!(textinput.get_content(), DOMString::from("mozilla rocks"));
|
||||
}
|
||||
|
||||
|
@ -489,7 +489,7 @@ fn test_textinput_set_content() {
|
|||
let mut textinput = text_input(Lines::Multiple, "abc\nde\nf");
|
||||
assert_eq!(textinput.get_content(), "abc\nde\nf");
|
||||
|
||||
textinput.set_content(DOMString::from("abc\nf"), true);
|
||||
textinput.set_content(DOMString::from("abc\nf"));
|
||||
assert_eq!(textinput.get_content(), "abc\nf");
|
||||
|
||||
assert_eq!(textinput.edit_point().line, 0);
|
||||
|
@ -634,10 +634,6 @@ fn test_textinput_unicode_handling() {
|
|||
fn test_selection_bounds() {
|
||||
let mut textinput = text_input(Lines::Single, "abcdef");
|
||||
|
||||
assert_eq!(TextPoint { line: 0, index: 0 }, textinput.selection_origin_or_edit_point());
|
||||
assert_eq!(TextPoint { line: 0, index: 0 }, textinput.selection_start());
|
||||
assert_eq!(TextPoint { line: 0, index: 0 }, textinput.selection_end());
|
||||
|
||||
textinput.set_selection_range(2, 5, SelectionDirection::Forward);
|
||||
assert_eq!(TextPoint { line: 0, index: 2 }, textinput.selection_origin_or_edit_point());
|
||||
assert_eq!(TextPoint { line: 0, index: 2 }, textinput.selection_start());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue