| Index: LayoutTests/editing/undo/undo-set-selection-crash.html
|
| diff --git a/LayoutTests/editing/undo/undo-set-selection-crash.html b/LayoutTests/editing/undo/undo-set-selection-crash.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6f6cb2876fc409bf63effebdfc10d396fdc42dfc
|
| --- /dev/null
|
| +++ b/LayoutTests/editing/undo/undo-set-selection-crash.html
|
| @@ -0,0 +1,36 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<script src="../../resources/js-test.js"></script>
|
| +</head>
|
| +<body>
|
| +<div id="test-div" contentEditable="true"><select></select></div>
|
| +<script>
|
| +description('Undo command should not make a selection anchored in another document.');
|
| +
|
| +window.jsTestIsAsync = true;
|
| +
|
| +var div = document.getElementById('test-div');
|
| +var selection = window.getSelection();
|
| +
|
| +div.focus();
|
| +document.execCommand('SelectAll');
|
| +document.execCommand('Indent');
|
| +document.execCommand('Outdent');
|
| +
|
| +var anotherDocument = document.implementation.createHTMLDocument('');
|
| +anotherDocument.body.appendChild(selection.getRangeAt(0).extractContents());
|
| +
|
| +div.contentEditable = false;
|
| +
|
| +document.execCommand('Undo');
|
| +document.execCommand('FindString', false, 'x');
|
| +
|
| +window.setTimeout(function () {
|
| + document.body.removeChild(div);
|
| + testPassed('Did not crash.');
|
| + finishJSTest();
|
| +}, 0);
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|