| Index: LayoutTests/editing/spelling/focusing-other-frame.html
|
| diff --git a/LayoutTests/editing/spelling/focusing-other-frame.html b/LayoutTests/editing/spelling/focusing-other-frame.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d5dbb5633bcc0a0cd26069ccdfa8942ed567b733
|
| --- /dev/null
|
| +++ b/LayoutTests/editing/spelling/focusing-other-frame.html
|
| @@ -0,0 +1,38 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<script src="../../fast/js/resources/js-test-pre.js"></script>
|
| +</head>
|
| +<body>
|
| +<iframe id="frame1" src="data:text/html,<body contenteditable></body>"></iframe>
|
| +<iframe id="frame2" src="data:text/html,<body contenteditable></body>"></iframe>
|
| +
|
| +<script>
|
| +
|
| +description("Last word written in an editable in one frame should be " +
|
| +"spellchecked when focusing other frame. To test manually type some " +
|
| +"misspelled word in one frame and focus other frame. The word should be marked.");
|
| +
|
| +if (window.internals) {
|
| + internals.settings.setAsynchronousSpellCheckingEnabled(false);
|
| +
|
| + var frame1 = document.getElementById("frame1");
|
| + var testEditable1 = frame1.contentWindow.document.createElement("div");
|
| + testEditable1.setAttribute("contentEditable", "true");
|
| + frame1.contentWindow.document.body.appendChild(testEditable1);
|
| + var frame2 = document.getElementById("frame2");
|
| + var testEditable2 = frame1.contentWindow.document.createElement("div");
|
| + testEditable2.setAttribute("contentEditable", "true");
|
| + frame2.contentWindow.document.body.appendChild(testEditable2);
|
| + testEditable1.focus();
|
| + frame1.contentWindow.document.execCommand("InsertText", false, "zz");
|
| + shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spelling")', '0');
|
| + testEditable2.focus();
|
| + shouldBe('internals.markerCountForNode(testEditable1.childNodes[0], "spelling")', '1');
|
| +} else {
|
| + alert("Automatic testing impossible. Test manually. See steps in the description.");
|
| +}
|
| +</script>
|
| +<script src="../../fast/js/resources/js-test-post.js"></script>
|
| +</body>
|
| +</html>
|
|
|