| Index: LayoutTests/editing/selection/focus-iframe-removal-crash.html
|
| diff --git a/LayoutTests/editing/selection/focus-iframe-removal-crash.html b/LayoutTests/editing/selection/focus-iframe-removal-crash.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e23b3a59eac93168c0089c6ecad2c99b0e4b3a7b
|
| --- /dev/null
|
| +++ b/LayoutTests/editing/selection/focus-iframe-removal-crash.html
|
| @@ -0,0 +1,29 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<script src="../../resources/js-test.js"></script>
|
| +</head>
|
| +<body>
|
| +<iframe></iframe>
|
| +<script>
|
| +description('Should not crash if iframe\'s document element\'s focusout event handler removes the iframe in the parent document.');
|
| +
|
| +window.jsTestIsAsync = true;
|
| +
|
| +function run()
|
| +{
|
| + var iframe = document.getElementsByTagName('iframe')[0];
|
| + iframe.contentDocument.documentElement.contentEditable = true;
|
| + iframe.contentDocument.documentElement.addEventListener('focusout', function () {
|
| + iframe.parentNode.removeChild(iframe);
|
| + }, false);
|
| + iframe.contentDocument.documentElement.focus();
|
| +
|
| + testPassed('Did not crash.');
|
| + window.finishJSTest();
|
| +}
|
| +
|
| +document.addEventListener('DOMContentLoaded', run);
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|