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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/spellcheck-attribute.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 <title>Spellcheck Attribute Test</title> 3 <title>Spellcheck Attribute Test</title>
4 <link rel="help" href="http://damowmow.com/playground/spellcheck.txt"> 4 <link rel="help" href="http://damowmow.com/playground/spellcheck.txt">
5 <script src="../editing.js"></script> 5 <script src="../editing.js"></script>
6 <script src="resources/util.js"></script> 6 <script src="resources/util.js"></script>
7 <script src="../../resources/js-test.js"></script> 7 <script src="../../resources/js-test.js"></script>
8 </head> 8 </head>
9 <body> 9 <body>
10 <div id="testRoot"> 10 <div id="testRoot">
(...skipping 29 matching lines...) Expand all
40 </div> 40 </div>
41 41
42 </div> 42 </div>
43 <script> 43 <script>
44 description('This tests if the "spellcheck" attribute is implemented ' 44 description('This tests if the "spellcheck" attribute is implemented '
45 + 'as written in its specification. If this test succeeds, you can see ' 45 + 'as written in its specification. If this test succeeds, you can see '
46 + 'forms filled with an invalid word "zz". Nevertheless, the "zz" is not ' 46 + 'forms filled with an invalid word "zz". Nevertheless, the "zz" is not '
47 + 'marked as misspelled in all of them.'); 47 + 'marked as misspelled in all of them.');
48 48
49 jsTestIsAsync = true; 49 jsTestIsAsync = true;
50 if (window.testRunner)
51 testRunner.setMockSpellCheckerEnabled(true);
50 52
51 // Type misspelling to all input elements. 53 // Type misspelling to all input elements.
52 var inputs = document.getElementsByTagName('input'); 54 var inputs = document.getElementsByTagName('input');
53 for (var i = 0; i < inputs.length; i++) 55 for (var i = 0; i < inputs.length; i++)
54 typeText(inputs[i], 'zz '); 56 typeText(inputs[i], 'zz ');
55 57
56 var shouldBeMarked; 58 var shouldBeMarked;
57 59
58 function testMarkerForMisspelledWord(id, isMisspelled) { 60 function testMarkerForMisspelledWord(id, isMisspelled) {
59 if (!window.internals) 61 if (!window.internals)
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 if (window.testRunner) { 106 if (window.testRunner) {
105 // Cleaning up for expectation text if running on DRT. 107 // Cleaning up for expectation text if running on DRT.
106 document.getElementById("testRoot").style.display = "none"; 108 document.getElementById("testRoot").style.display = "none";
107 } 109 }
108 finishJSTest(); 110 finishJSTest();
109 } 111 }
110 done(); 112 done();
111 </script> 113 </script>
112 </body> 114 </body>
113 </html> 115 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698