OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../fast/js/resources/js-test-pre.js"></script> |
| 5 </head> |
| 6 <body> |
| 7 <iframe id="frame1" src="data:text/html,<body contenteditable></body>"></iframe> |
| 8 <iframe id="frame2" src="data:text/html,<body contenteditable></body>"></iframe> |
| 9 |
| 10 <script> |
| 11 |
| 12 description("Last word written in an editable in one frame should be " + |
| 13 "spellchecked when focusing other frame. To test manually type some " + |
| 14 "misspelled word in one frame and focus other frame. The word should be marked."
); |
| 15 |
| 16 if (window.internals) { |
| 17 internals.settings.setAsynchronousSpellCheckingEnabled(false); |
| 18 |
| 19 var frame1 = document.getElementById("frame1"); |
| 20 var testEditable1 = frame1.contentWindow.document.createElement("div"); |
| 21 testEditable1.setAttribute("contentEditable", "true"); |
| 22 frame1.contentWindow.document.body.appendChild(testEditable1); |
| 23 var frame2 = document.getElementById("frame2"); |
| 24 var testEditable2 = frame1.contentWindow.document.createElement("div"); |
| 25 testEditable2.setAttribute("contentEditable", "true"); |
| 26 frame2.contentWindow.document.body.appendChild(testEditable2); |
| 27 testEditable1.focus(); |
| 28 frame1.contentWindow.document.execCommand("InsertText", false, "zz"); |
| 29 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '0'); |
| 30 testEditable2.focus(); |
| 31 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
g")', '1'); |
| 32 } else { |
| 33 alert("Automatic testing impossible. Test manually. See steps in the descrip
tion."); |
| 34 } |
| 35 </script> |
| 36 <script src="../../fast/js/resources/js-test-post.js"></script> |
| 37 </body> |
| 38 </html> |
OLD | NEW |