blob: 5187ed5e99373b57cc3e5a858324435c31c85127 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
internals.settings.setAsynchronousSpellCheckingEnabled(true);
internals.settings.setUnifiedTextCheckerEnabled(true);
}
function runTest() {
var textToSelect = "This text should be selected, but this frame shouldn't be focused.";
var frame = document.getElementById("frame");
var s = frame.contentDocument.getSelection();
s.collapse(frame.contentDocument.body, 0);
frame.contentDocument.execCommand("InsertText", false, textToSelect);
frame.parentNode.removeChild(frame);
window.setTimeout(function() {
if (window.testRunner)
testRunner.notifyDone();
}, 50);
}
</script>
</head>
<body>
<div>PASS unless crash.</div>
<iframe id="frame" src="../resources/contenteditable-iframe-src.html" onload="runTest();"></iframe>
</body>
</html>
|