| 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.setContinuousSpellCheckingEnabled(true); | 32 internals.setSpellCheckingEnabled(true); |
| 33 | 33 |
| 34 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '0'); | 34 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '0'); |
| 35 shouldBe('internals.markerCountForNode(testEditable2.childNodes[0], "spellin
g")', '0'); | 35 shouldBe('internals.markerCountForNode(testEditable2.childNodes[0], "spellin
g")', '0'); |
| 36 testEditable1.focus(); | 36 testEditable1.focus(); |
| 37 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '3'); | 37 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '3'); |
| 38 testEditable2.focus(); | 38 testEditable2.focus(); |
| 39 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '3'); | 39 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '3'); |
| 40 internals.setContinuousSpellCheckingEnabled(false); | 40 internals.setSpellCheckingEnabled(false); |
| 41 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '0'); | 41 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '0'); |
| 42 shouldBe('internals.markerCountForNode(testEditable2.childNodes[0], "spellin
g")', '0'); | 42 shouldBe('internals.markerCountForNode(testEditable2.childNodes[0], "spellin
g")', '0'); |
| 43 internals.setContinuousSpellCheckingEnabled(true); | 43 internals.setSpellCheckingEnabled(true); |
| 44 testEditable1.focus(); | 44 testEditable1.focus(); |
| 45 testEditable2.focus(); | 45 testEditable2.focus(); |
| 46 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '3'); | 46 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '3'); |
| 47 shouldBe('internals.markerCountForNode(testEditable2.childNodes[0], "spellin
g")', '3'); | 47 shouldBe('internals.markerCountForNode(testEditable2.childNodes[0], "spellin
g")', '3'); |
| 48 } else { | 48 } else { |
| 49 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."); |
| 50 } | 50 } |
| 51 </script> | 51 </script> |
| 52 </body> | 52 </body> |
| 53 </html> | 53 </html> |
| OLD | NEW |