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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/spelling-marker-description.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 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <div id="container"> 7 <div id="container">
8 <div id="destination" contentEditable></div> 8 <div id="destination" contentEditable></div>
9 </div> 9 </div>
10 10
11 <script> 11 <script>
12 if (window.testRunner)
13 testRunner.setMockSpellCheckerEnabled(true);
12 14
13 function test() 15 function test()
14 { 16 {
15 jsTestIsAsync = true; 17 jsTestIsAsync = true;
16 18
17 var sel = window.getSelection(); 19 var sel = window.getSelection();
18 var destination = document.getElementById("destination"); 20 var destination = document.getElementById("destination");
19 destination.focus(); 21 destination.focus();
20 document.execCommand("InsertHTML", false, "wellcome"); 22 document.execCommand("InsertHTML", false, "wellcome");
21 document.execCommand("InsertText", false, "."); 23 document.execCommand("InsertText", false, ".");
22 24
23 shouldBecomeEqualToString('internals.markerDescriptionForNode(destination.fi rstChild, "spelling", 0)', 'welcome', finishJSTest); 25 shouldBecomeEqualToString('internals.markerDescriptionForNode(destination.fi rstChild, "spelling", 0)', 'welcome', finishJSTest);
24 } 26 }
25 27
26 description("The spellchecker should store replacement text in each marker."); 28 description("The spellchecker should store replacement text in each marker.");
27 if (window.internals) 29 if (window.internals)
28 test(); 30 test();
29 31
30 </script> 32 </script>
31 </body> 33 </body>
32 </html> 34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698