Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/editing/spelling/context_click_select_misspelling.html |
| diff --git a/third_party/WebKit/LayoutTests/editing/spelling/context_click_select_misspelling.html b/third_party/WebKit/LayoutTests/editing/spelling/context_click_select_misspelling.html |
| index 199edbf4808fbb5b41bc145a689391624ffbbac5..a29f25baaeb2bb2c8434cd44635957f5aee7d9c7 100644 |
| --- a/third_party/WebKit/LayoutTests/editing/spelling/context_click_select_misspelling.html |
| +++ b/third_party/WebKit/LayoutTests/editing/spelling/context_click_select_misspelling.html |
| @@ -11,7 +11,7 @@ test(() => assert_not_equals(window.internals, undefined), |
| test(() => assert_not_equals(window.eventSender, undefined), |
| 'This test requires event sender to simulate keyboard and mouse actions.'); |
| -const kNumTests = 4; |
| +const kNumTests = 5; |
| const heldTest = async_test( |
| () => assert_true(true), |
| 'Dummy async test for blocking test harness.', |
| @@ -94,6 +94,36 @@ spellcheck_test( |
| '', |
| '<div contenteditable>#wellcome# home.</div>', |
| { |
| + title: 'Context click at boundary of misspelled word.', |
|
Xiaocheng
2017/06/10 01:02:51
nit: The title should be "Setup of context clickin
|
| + callback: sample => test(() => { |
| + const container = sample.document.querySelector('div'); |
| + const shouldSelect = isMac(navigator.platform); |
| + |
| + assertContextClickSelection( |
| + container, 0, '', |
|
rlanday
2017/06/10 00:40:05
Note: we might want to modify this test so the mis
Xiaocheng
2017/06/10 01:02:51
If the behavior on Mac is different when the missp
Xiaocheng
2017/06/10 01:07:30
Wait... Let's investigate first why the behavior i
|
| + 'Context clicking immediately before "wellcome" does not select it'); |
| + |
| + // On Mac, right-clicking immediately after a word will select the space after it. |
| + if (shouldSelect) { |
| + assertContextClickSelection( |
| + container, 8, ' ', |
| + 'Context clicking immediately after "wellcome" selects the space after it'); |
| + return; |
| + } |
| + |
| + assertContextClickSelection( |
| + container, 8, '', |
| + 'Context clicking immediately after "wellcome" does not select it'); |
| + }, |
| + 'Context clicking immediately before or after misspelled word in editable DIV does not select it.', |
| + {sample: sample, blockHeldTest: true}) |
| + }); |
| + |
| +spellcheck_test( |
| + '<div contenteditable>wellcome home.|</div>', |
| + '', |
| + '<div contenteditable>#wellcome# home.</div>', |
| + { |
| title: 'Mark initial misspelling "wellcome" in editable DIV.', |
| callback: sample => test(() => { |
| const container = sample.document.querySelector('div'); |