| Index: third_party/WebKit/LayoutTests/editing/selection/node-removal-2.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/selection/node-removal-2.html b/third_party/WebKit/LayoutTests/editing/selection/node-removal-2.html
|
| index d32ba44b0d22f173ba732f0011c3fc20ab711191..2fa76b0af9a33bc16c655600a72c9896a01b56d8 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/selection/node-removal-2.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/selection/node-removal-2.html
|
| @@ -1,38 +1,16 @@
|
| -<html>
|
| -<head>
|
| +<!doctype html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../assert_selection.js"></script>
|
| <script>
|
| -if (window.testRunner)
|
| - testRunner.dumpEditingCallbacks();
|
| +test(() => {
|
| + assert_selection(
|
| + '^foo<span>b|ar</span>baz',
|
| + selection => {
|
| + const span = selection.document.querySelector('span');
|
| + span.parentNode.removeChild(span);
|
| + selection.document.execCommand('selectAll');
|
| + },
|
| + '^foobaz|');
|
| +}, 'selectAll after node remove');
|
| </script>
|
| -
|
| -
|
| -<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
|
| -
|
| -<script>
|
| -
|
| -function runTest() {
|
| - var selection = window.getSelection();
|
| - var e = document.getElementById("test");
|
| - var r = document.getElementById("removeme");
|
| -
|
| - selection.setBaseAndExtent(e, 0, r.childNodes[0], 2);
|
| -
|
| - r.parentNode.removeChild(r);
|
| - selectAllCommand();
|
| -}
|
| -
|
| -</script>
|
| -
|
| -<title>Removing the endpoints of a selection</title>
|
| -</head>
|
| -<body>
|
| -<p>This tests behavior when a node that serves as the start or end of a selection is removed from the document. Ideally, we would just adjust the selection when an endpoint is removed, for now, we just blow away the selection.</p>
|
| -<p>This test creates a selection that ends inside of a node that will be removed. Then the node is removed. Then a Select All is executed. The entire document should be selected.</p>
|
| -<div id="test">
|
| -hello <span style="color:red;" id="removeme">removeme</span> world!
|
| -</div>
|
| -
|
| -<script>runTest()</script>
|
| -
|
| -</body>
|
| -</html>
|
|
|