Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: third_party/WebKit/LayoutTests/editing/spelling/context_click_select_misspelling.html

Issue 2932123002: Add test case for context click at misspelled word boundary (Closed)
Patch Set: Actually fix Mac Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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');
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698