OLD | NEW |
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 30 matching lines...) Expand all Loading... |
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 | 50 |
51 if (window.internals) | |
52 internals.settings.setUnifiedTextCheckerEnabled(true); | |
53 | |
54 // Type misspelling to all input elements. | 51 // Type misspelling to all input elements. |
55 var inputs = document.getElementsByTagName('input'); | 52 var inputs = document.getElementsByTagName('input'); |
56 for (var i = 0; i < inputs.length; i++) | 53 for (var i = 0; i < inputs.length; i++) |
57 typeText(inputs[i], 'zz '); | 54 typeText(inputs[i], 'zz '); |
58 | 55 |
59 var shouldBeMarked; | 56 var shouldBeMarked; |
60 | 57 |
61 function testMarkerForMisspelledWord(id, isMisspelled) { | 58 function testMarkerForMisspelledWord(id, isMisspelled) { |
62 if (!window.internals) | 59 if (!window.internals) |
63 return done(); | 60 return done(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 if (window.testRunner) { | 104 if (window.testRunner) { |
108 // Cleaning up for expectation text if running on DRT. | 105 // Cleaning up for expectation text if running on DRT. |
109 document.getElementById("testRoot").style.display = "none"; | 106 document.getElementById("testRoot").style.display = "none"; |
110 } | 107 } |
111 finishJSTest(); | 108 finishJSTest(); |
112 } | 109 } |
113 done(); | 110 done(); |
114 </script> | 111 </script> |
115 </body> | 112 </body> |
116 </html> | 113 </html> |
OLD | NEW |