Chromium Code Reviews| 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..c33b237f62f8d0c9582a3bb337f9cff53f86addd |
| --- /dev/null |
| +++ b/LayoutTests/editing/spelling/focusing-other-frame.html |
| @@ -0,0 +1,36 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| +<script src="../../fast/js/resources/js-test-pre.js"></script> |
| +</head> |
| +<body> |
| +<iframe id="frame1" src="data:text/html,<body></body>"></iframe> |
| +<iframe id="frame2" src="data:text/html,<body></body>"></iframe> |
| + |
| +<script> |
| + |
| +description("Editable in one frame should be spellchecked when focusing other frame."); |
| + |
| +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."); |
|
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
|
| +} |
| +</script> |
| +<script src="../../fast/js/resources/js-test-post.js"></script> |
| +</body> |
| +</html> |