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></body>"></iframe> | |
8 <iframe id="frame2" src="data:text/html,<body></body>"></iframe> | |
9 | |
10 <script> | |
11 | |
12 description("Editable in one frame should be spellchecked when focusing other fr ame."); | |
13 | |
14 if (window.internals) { | |
15 internals.settings.setAsynchronousSpellCheckingEnabled(false); | |
16 | |
17 var frame1 = document.getElementById("frame1"); | |
18 var testEditable1 = frame1.contentWindow.document.createElement("div"); | |
19 testEditable1.setAttribute("contentEditable", "true"); | |
20 frame1.contentWindow.document.body.appendChild(testEditable1); | |
21 var frame2 = document.getElementById("frame2"); | |
22 var testEditable2 = frame1.contentWindow.document.createElement("div"); | |
23 testEditable2.setAttribute("contentEditable", "true"); | |
24 frame2.contentWindow.document.body.appendChild(testEditable2); | |
25 testEditable1.focus(); | |
26 frame1.contentWindow.document.execCommand("InsertText", false, "zz"); | |
27 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin g")', '0'); | |
28 testEditable2.focus(); | |
29 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spellin g")', '1'); | |
30 } else { | |
31 alert("Automatic testing impossible."); | |
tony
2013/08/02 20:35:03
This should say that the test requires content_she
please use gerrit instead
2013/08/02 20:41:37
In addition, it would be better to use log() funct
| |
32 } | |
33 </script> | |
34 <script src="../../fast/js/resources/js-test-post.js"></script> | |
35 </body> | |
36 </html> | |
OLD | NEW |