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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/spelling-linebreak.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 <html> 1 <html>
2 <head> 2 <head>
3 3
4 <style> 4 <style>
5 .editing { 5 .editing {
6 border: 2px solid red; 6 border: 2px solid red;
7 padding: 12px; 7 padding: 12px;
8 font-size: 24px; 8 font-size: 24px;
9 } 9 }
10 </style> 10 </style>
11 <script src="../../resources/js-test.js"></script> 11 <script src="../../resources/js-test.js"></script>
12 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script > 12 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script >
13 13
14 <script> 14 <script>
15 15
16 jsTestIsAsync = true; 16 jsTestIsAsync = true;
17 if (window.testRunner)
18 testRunner.setMockSpellCheckerEnabled(true);
17 19
18 function editingTest() { 20 function editingTest() {
19 21
20 var elem = document.getElementById("test"); 22 var elem = document.getElementById("test");
21 var selection = window.getSelection(); 23 var selection = window.getSelection();
22 selection.collapse(elem, elem.childNodes.length); 24 selection.collapse(elem, elem.childNodes.length);
23 25
24 typeCharacterCommand('z'); 26 typeCharacterCommand('z');
25 typeCharacterCommand('z'); 27 typeCharacterCommand('z');
26 typeCharacterCommand(' '); 28 typeCharacterCommand(' ');
(...skipping 26 matching lines...) Expand all
53 </script> 55 </script>
54 <div contenteditable id="root" class="editing"> 56 <div contenteditable id="root" class="editing">
55 <!-- we need to lead "Hello," to preserve the marker even after collapse() --> 57 <!-- we need to lead "Hello," to preserve the marker even after collapse() -->
56 <span id="test">Hello,</span> 58 <span id="test">Hello,</span>
57 </div> 59 </div>
58 <script> 60 <script>
59 editingTest(); 61 editingTest();
60 </script> 62 </script>
61 </body> 63 </body>
62 </html> 64 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698