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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/spelling-backward.html

Issue 2270293003: Add a switch to TestRunner to enable/disable mock spell checker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use in-class initialization Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <script src="../../editing/editing.js"></script> 5 <script src="../../editing/editing.js"></script>
6 <div id="div" contenteditable="true"></div> 6 <div id="div" contenteditable="true"></div>
7 <script> 7 <script>
8 description('This tests for a bug when moving the caret backward through ' 8 description('This tests for a bug when moving the caret backward through '
9 + 'a misspelled word. Once the caret is no longer adjacent to it, ' 9 + 'a misspelled word. Once the caret is no longer adjacent to it, '
10 + 'it should be marked as misspelled.'); 10 + 'it should be marked as misspelled.');
11 11
12 jsTestIsAsync = true; 12 jsTestIsAsync = true;
13 if (window.testRunner)
14 testRunner.setMockSpellCheckerEnabled(true);
13 15
14 var div = document.getElementById("div"); 16 var div = document.getElementById("div");
15 div.focus(); 17 div.focus();
16 document.execCommand("InsertText", false, "This sentence ends with a misspelled word asd."); 18 document.execCommand("InsertText", false, "This sentence ends with a misspelled word asd.");
17 19
18 moveSelectionBackwardByCharacterCommand(); 20 moveSelectionBackwardByCharacterCommand();
19 moveSelectionBackwardByCharacterCommand(); 21 moveSelectionBackwardByCharacterCommand();
20 moveSelectionBackwardByCharacterCommand(); 22 moveSelectionBackwardByCharacterCommand();
21 moveSelectionBackwardByCharacterCommand(); 23 moveSelectionBackwardByCharacterCommand();
22 moveSelectionBackwardByCharacterCommand(); 24 moveSelectionBackwardByCharacterCommand();
23 moveSelectionBackwardByCharacterCommand(); 25 moveSelectionBackwardByCharacterCommand();
24 26
25 if (window.internals) 27 if (window.internals)
26 shouldBecomeEqual("internals.hasSpellingMarker(document, 42, 3)", "true", fi nishJSTest); 28 shouldBecomeEqual("internals.hasSpellingMarker(document, 42, 3)", "true", fi nishJSTest);
27 </script> 29 </script>
28 </body> 30 </body>
29 </html> 31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698