OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../editing.js"></script> | 4 <script src="../editing.js"></script> |
5 <script src="resources/util.js"></script> | 5 <script src="resources/util.js"></script> |
6 <script src="../../fast/js/resources/js-test-pre.js"></script> | 6 <script src="../../fast/js/resources/js-test-pre.js"></script> |
7 </head> | 7 </head> |
8 <body onload="test();"> | 8 <body onload="test();"> |
9 <pre id="console"></pre> | 9 <pre id="console"></pre> |
10 <div id="container"> | 10 <div id="container"> |
(...skipping 18 matching lines...) Expand all Loading... |
29 return; | 29 return; |
30 } | 30 } |
31 | 31 |
32 internals.settings.setUnifiedTextCheckerEnabled(true); | 32 internals.settings.setUnifiedTextCheckerEnabled(true); |
33 internals.settings.setAsynchronousSpellCheckingEnabled(true); | 33 internals.settings.setAsynchronousSpellCheckingEnabled(true); |
34 internals.setContinuousSpellCheckingEnabled(true); | 34 internals.setContinuousSpellCheckingEnabled(true); |
35 | 35 |
36 function waitForMarkersToAppear(nretry) | 36 function waitForMarkersToAppear(nretry) |
37 { | 37 { |
38 if (nretry > 0 | 38 if (nretry > 0 |
39 && !internals.markerCountForNode(findFirstTextNode(testEditable), "s
pelling") | 39 && (!internals.markerCountForNode(findFirstTextNode(testEditable), "
spelling") |
40 && !internals.markerCountForNode(findFirstTextNode(testTextArea), "s
pelling") | 40 || !internals.markerCountForNode(findFirstTextNode(testTextArea), "s
pelling") |
41 && !internals.markerCountForNode(findFirstTextNode(testTextField), "
spelling")) { | 41 || !internals.markerCountForNode(findFirstTextNode(testTextField), "
spelling"))) { |
42 window.setTimeout(function() { waitForMarkersToAppear(nretry - 1); }
, 5); | 42 window.setTimeout(function() { waitForMarkersToAppear(nretry - 1); }
, 5); |
43 } else { | 43 } else { |
44 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextAre
a), "spelling")', '3'); | 44 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextAre
a), "spelling")', '3'); |
45 shouldBe('internals.markerCountForNode(findFirstTextNode(testEditabl
e), "spelling")', '3'); | 45 shouldBe('internals.markerCountForNode(findFirstTextNode(testEditabl
e), "spelling")', '3'); |
46 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextFie
ld), "spelling")', '3'); | 46 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextFie
ld), "spelling")', '3'); |
47 if (window.testRunner) | 47 if (window.testRunner) |
48 testRunner.notifyDone(); | 48 testRunner.notifyDone(); |
49 } | 49 } |
50 } | 50 } |
51 | 51 |
52 if (window.testRunner) { | 52 if (window.testRunner) { |
53 testRunner.dumpAsText(); | 53 testRunner.dumpAsText(); |
54 testRunner.waitUntilDone(); | 54 testRunner.waitUntilDone(); |
55 } | 55 } |
56 | 56 |
57 shouldBe('internals.markerCountForNode(findFirstTextNode(testEditable), "spe
lling")', '0'); | 57 shouldBe('internals.markerCountForNode(findFirstTextNode(testEditable), "spe
lling")', '0'); |
58 testEditable.focus(); | 58 testEditable.focus(); |
59 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spe
lling")', '0'); | 59 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextArea), "spe
lling")', '0'); |
60 testTextArea.focus(); | 60 testTextArea.focus(); |
61 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextField), "sp
elling")', '0'); | 61 shouldBe('internals.markerCountForNode(findFirstTextNode(testTextField), "sp
elling")', '0'); |
62 testTextField.focus(); | 62 testTextField.focus(); |
63 waitForMarkersToAppear(10); | 63 waitForMarkersToAppear(10); |
64 } | 64 } |
65 | 65 |
66 </script> | 66 </script> |
67 <script src="../../fast/js/resources/js-test-post.js"></script> | 67 <script src="../../fast/js/resources/js-test-post.js"></script> |
68 </body> | 68 </body> |
69 </html> | 69 </html> |
OLD | NEW |