Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / spelling / focusing-other-frame.html
blob7dd9a2e432c3379971d8fc2a85568161edd1ab89
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="resources/util.js"></script>
5 <script src="../../resources/js-test.js"></script>
6 </head>
7 <body>
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>
12 <script>
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');
34 } else {
35 log("Automatic testing impossible. Test manually. See steps in the description.");
37 </script>
38 </body>
39 </html>