| 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> | 
| 11 | 11 | 
| 12 <script> | 12 <script> | 
| 13 | 13 | 
| 14 description("Spell checking should be triggered on focus of an editable. " + | 14 description("Spell checking should be triggered on focus of an editable. " + | 
| 15 "Also after retarting spell checker. It applies to all frames." + | 15 "Also after retarting spell checker. It applies to all frames." + | 
| 16 "To test manually type focus above editable. Misspellings in them " + | 16 "To test manually type focus above editable. Misspellings in them " + | 
| 17 "should be marked on focus.Turn spell checker off and on again and again focus e
    ditables. " + | 17 "should be marked on focus.Turn spell checker off and on again and again focus e
    ditables. " + | 
| 18 "Mispelling should be marked again"); | 18 "Mispelling should be marked again"); | 
| 19 | 19 | 
|  | 20 if (window.testRunner) | 
|  | 21     testRunner.setMockSpellCheckerEnabled(true); | 
|  | 22 | 
| 20 var frame1 = document.getElementById("frame1"); | 23 var frame1 = document.getElementById("frame1"); | 
| 21 var testEditable1 = frame1.contentWindow.document.createElement("div"); | 24 var testEditable1 = frame1.contentWindow.document.createElement("div"); | 
| 22 testEditable1.setAttribute("contentEditable", "true"); | 25 testEditable1.setAttribute("contentEditable", "true"); | 
| 23 frame1.contentWindow.document.body.appendChild(testEditable1); | 26 frame1.contentWindow.document.body.appendChild(testEditable1); | 
| 24 var frame2 = document.getElementById("frame2"); | 27 var frame2 = document.getElementById("frame2"); | 
| 25 var testEditable2 = frame1.contentWindow.document.createElement("div"); | 28 var testEditable2 = frame1.contentWindow.document.createElement("div"); | 
| 26 testEditable2.setAttribute("contentEditable", "true"); | 29 testEditable2.setAttribute("contentEditable", "true"); | 
| 27 frame2.contentWindow.document.body.appendChild(testEditable2); | 30 frame2.contentWindow.document.body.appendChild(testEditable2); | 
| 28 testEditable1.innerText = "zz zz zz."; | 31 testEditable1.innerText = "zz zz zz."; | 
| 29 testEditable2.innerText = "zz zz zz."; | 32 testEditable2.innerText = "zz zz zz."; | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
| 44     testEditable1.focus(); | 47     testEditable1.focus(); | 
| 45     testEditable2.focus(); | 48     testEditable2.focus(); | 
| 46     shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
    g")', '3'); | 49     shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin
    g")', '3'); | 
| 47     shouldBe('internals.markerCountForNode(testEditable2.childNodes[0], "spellin
    g")', '3'); | 50     shouldBe('internals.markerCountForNode(testEditable2.childNodes[0], "spellin
    g")', '3'); | 
| 48 } else { | 51 } else { | 
| 49     log("Automatic testing impossible. Test manually. See steps in the descripti
    on."); | 52     log("Automatic testing impossible. Test manually. See steps in the descripti
    on."); | 
| 50 } | 53 } | 
| 51 </script> | 54 </script> | 
| 52 </body> | 55 </body> | 
| 53 </html> | 56 </html> | 
| OLD | NEW | 
|---|