blob: d3e1fcc35e21d745c70c7021d9224b2f44472166 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script>
jsTestIsAsync = true;
let subframe;
async function compositionDidUpdate() {
await new Promise(requestAnimationFrame);
subframe.remove();
testPassed("Removed the subframe");
finishJSTest();
}
addEventListener("load", () => {
subframe = document.querySelector("iframe");
subframe.contentDocument.body.focus();
if (window.textInputController)
textInputController.setMarkedText("hello", 0, 5);
});
</script>
</head>
<body>
<iframe srcdoc="
<style>body, html { width: 100%; height: 100%; }</style>
<body contenteditable></body>
<script>document.body.addEventListener('compositionupdate', () => parent.compositionDidUpdate());</script>"></iframe>
<p>Typing in the above <code>iframe</code> using an input method should not trigger a crash.</p>
</body>
</html>