| Index: third_party/WebKit/LayoutTests/editing/selection/5497643.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/selection/5497643.html b/third_party/WebKit/LayoutTests/editing/selection/5497643.html
|
| index 90de6df1f7aeb341bb06c8877a977ed0f9a4c398..f39d814b021869cd15007d2e57eef9fc2e24318b 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/selection/5497643.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/selection/5497643.html
|
| @@ -1,15 +1,16 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| <p>This tests to make sure that a selection inside a textarea is updated when the textarea is removed from the document.</p>
|
| <textarea id="textarea"></textarea>
|
| +<div id="log"></div>
|
| <script>
|
| -if (window.testRunner)
|
| - window.testRunner.dumpAsText();
|
| textarea = document.getElementById("textarea");
|
| textarea.setSelectionRange(0, 0);
|
| textarea.parentNode.removeChild(textarea);
|
| -if (window.getSelection().type == 'Caret' &&
|
| - window.getSelection().getRangeAt(0).startContainer == document.body &&
|
| - window.getSelection().getRangeAt(0).startOffset == 2)
|
| - alert("SUCCESS: Selection is set to position 2 of BODY.")
|
| -else
|
| - alert("FAILURE: The selection is not set correctly after textarea was deleted.")
|
| +test(function() {
|
| + assert_equals(window.getSelection().type, 'Caret');
|
| + assert_equals(window.getSelection().getRangeAt(0).startContainer, document.body);
|
| + assert_equals(window.getSelection().getRangeAt(0).startOffset, 2);
|
| +});
|
| </script>
|
|
|