OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="resources/util.js"></script> | 4 <script src="resources/util.js"></script> |
5 <script src="../../resources/js-test.js"></script> | 5 <script src="../../resources/js-test.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <pre id="console"></pre> | 8 <pre id="console"></pre> |
9 <iframe id="frame1" src="data:text/html,<body></body>"></iframe> | 9 <iframe id="frame1" src="data:text/html,<body></body>"></iframe> |
10 <iframe id="frame2" src="data:text/html,<body></body>"></iframe> | 10 <iframe id="frame2" src="data:text/html,<body></body>"></iframe> |
(...skipping 11 matching lines...) Expand all Loading... |
22 testEditable1.setAttribute("contentEditable", "true"); | 22 testEditable1.setAttribute("contentEditable", "true"); |
23 frame1.contentWindow.document.body.appendChild(testEditable1); | 23 frame1.contentWindow.document.body.appendChild(testEditable1); |
24 var frame2 = document.getElementById("frame2"); | 24 var frame2 = document.getElementById("frame2"); |
25 var testEditable2 = frame1.contentWindow.document.createElement("div"); | 25 var testEditable2 = frame1.contentWindow.document.createElement("div"); |
26 testEditable2.setAttribute("contentEditable", "true"); | 26 testEditable2.setAttribute("contentEditable", "true"); |
27 frame2.contentWindow.document.body.appendChild(testEditable2); | 27 frame2.contentWindow.document.body.appendChild(testEditable2); |
28 testEditable1.innerText = "zz zz zz."; | 28 testEditable1.innerText = "zz zz zz."; |
29 testEditable2.innerText = "zz zz zz."; | 29 testEditable2.innerText = "zz zz zz."; |
30 | 30 |
31 if (window.internals) { | 31 if (window.internals) { |
32 internals.settings.setUnifiedTextCheckerEnabled(true); | |
33 internals.setContinuousSpellCheckingEnabled(true); | 32 internals.setContinuousSpellCheckingEnabled(true); |
34 | 33 |
35 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '0'); | 34 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '0'); |
36 shouldBe('internals.markerCountForNode(testEditable2.childNodes[0], "spellin
g")', '0'); | 35 shouldBe('internals.markerCountForNode(testEditable2.childNodes[0], "spellin
g")', '0'); |
37 testEditable1.focus(); | 36 testEditable1.focus(); |
38 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '3'); | 37 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '3'); |
39 testEditable2.focus(); | 38 testEditable2.focus(); |
40 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '3'); | 39 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '3'); |
41 internals.setContinuousSpellCheckingEnabled(false); | 40 internals.setContinuousSpellCheckingEnabled(false); |
42 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '0'); | 41 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '0'); |
43 shouldBe('internals.markerCountForNode(testEditable2.childNodes[0], "spellin
g")', '0'); | 42 shouldBe('internals.markerCountForNode(testEditable2.childNodes[0], "spellin
g")', '0'); |
44 internals.setContinuousSpellCheckingEnabled(true); | 43 internals.setContinuousSpellCheckingEnabled(true); |
45 testEditable1.focus(); | 44 testEditable1.focus(); |
46 testEditable2.focus(); | 45 testEditable2.focus(); |
47 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '3'); | 46 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '3'); |
48 shouldBe('internals.markerCountForNode(testEditable2.childNodes[0], "spellin
g")', '3'); | 47 shouldBe('internals.markerCountForNode(testEditable2.childNodes[0], "spellin
g")', '3'); |
49 } else { | 48 } else { |
50 log("Automatic testing impossible. Test manually. See steps in the descripti
on."); | 49 log("Automatic testing impossible. Test manually. See steps in the descripti
on."); |
51 } | 50 } |
52 </script> | 51 </script> |
53 </body> | 52 </body> |
54 </html> | 53 </html> |
OLD | NEW |