4 <script src=
"resources/util.js"></script>
5 <script src=
"../../resources/js-test.js"></script>
8 <pre id=
"console"></pre>
9 <iframe id=
"frame1" src=
"data:text/html,<body contenteditable></body>"></iframe>
10 <iframe id=
"frame2" src=
"data:text/html,<body contenteditable></body>"></iframe>
14 description("Last word written in an editable in one frame should be " +
15 "spellchecked when focusing other frame. To test manually type some " +
16 "misspelled word in one frame and focus other frame. The word should be marked.");
18 if (window
.internals
) {
19 internals
.settings
.setAsynchronousSpellCheckingEnabled(false);
21 var frame1
= document
.getElementById("frame1");
22 var testEditable1
= frame1
.contentWindow
.document
.createElement("div");
23 testEditable1
.setAttribute("contentEditable", "true");
24 frame1
.contentWindow
.document
.body
.appendChild(testEditable1
);
25 var frame2
= document
.getElementById("frame2");
26 var testEditable2
= frame1
.contentWindow
.document
.createElement("div");
27 testEditable2
.setAttribute("contentEditable", "true");
28 frame2
.contentWindow
.document
.body
.appendChild(testEditable2
);
29 testEditable1
.focus();
30 frame1
.contentWindow
.document
.execCommand("InsertText", false, "zz");
31 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spelling")', '0');
32 testEditable2
.focus();
33 shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spelling")', '1');
35 log("Automatic testing impossible. Test manually. See steps in the description.");