blob: 45c3f9bd9e252f3c24fb660e454d492244d7cff3 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
selection_test(
'<iframe></iframe>',
selection => {
assert_own_property(window, 'textInputController',
'this test requires window.textInputController.');
const document = selection.document;
const iframe = document.querySelector('iframe');
iframe.contentDocument.documentElement.contentEditable = true;
iframe.contentDocument.documentElement.addEventListener(
'textInput',
() => iframe.parentNode.removeChild(iframe));
iframe.contentDocument.documentElement.focus();
textInputController.setMarkedText('1', 0, 1);
textInputController.insertText('x');
},
'',
'Should not crash when textInput handler removes current frame when doing InsertText');
</script>