| Index: LayoutTests/editing/selection/move-by-line-004.html
|
| diff --git a/LayoutTests/editing/selection/move-by-line-004.html b/LayoutTests/editing/selection/move-by-line-004.html
|
| index 38deeaba172add362c249835f2f142d7e03fab75..243dd045b265d7da482b2bdd19356466b237e704 100644
|
| --- a/LayoutTests/editing/selection/move-by-line-004.html
|
| +++ b/LayoutTests/editing/selection/move-by-line-004.html
|
| @@ -1,9 +1,7 @@
|
| -<p>
|
| - Test that moving the caret with line granularity within the highest
|
| - editable root works across non-editable content.
|
| -</p>
|
| -<pre id="console"></pre>
|
| -<div contenteditable="true">
|
| +<script src="../../fast/js/resources/js-test-pre.js"></script>
|
| +<script src="./resources/js-test-selection-shared.js"></script>
|
| +
|
| +<div id="test" contenteditable="true">
|
| <div contenteditable="false">
|
| <span id="pie" contenteditable="true">apple pie</span>
|
| </div>
|
| @@ -14,36 +12,15 @@
|
| <span id="juice" contenteditable="true">apple juice</span>
|
| </div>
|
| </div>
|
| -<script>
|
| - function log(message)
|
| - {
|
| - document.getElementById("console").appendChild(document.createTextNode(message + "\n"));
|
| - }
|
| -
|
| - if (window.testRunner)
|
| - testRunner.dumpAsText();
|
|
|
| - var fail = false;
|
| - var pie = document.getElementById("pie");
|
| - var juice = document.getElementById("juice");
|
| -
|
| - var sel = getSelection();
|
| - sel.setPosition(pie.firstChild, 3);
|
| - sel.modify("move", "forward", "line");
|
| -
|
| - if (sel.anchorNode !== juice.firstChild || sel.anchorOffset != 3) {
|
| - log("FAIL: Did not move to the next line");
|
| - fail = true;
|
| - }
|
| +<script>
|
| +description('Test that moving the caret with line granularity within the highest editable root doesn\'t work across non-editable content.');
|
|
|
| - sel.setPosition(juice.firstChild, 3);
|
| - sel.modify("move", "backward", "line");
|
| +testCaretMotion('forward', 'line', 1, 'pie', 3, 'pie', -1);
|
| +testCaretMotion('backward', 'line', 1, 'juice', 3, 'juice', 0);
|
|
|
| - if (sel.anchorNode !== pie.firstChild || sel.anchorOffset != 3) {
|
| - log("FAIL: Did not move to the previous line");
|
| - fail = true;
|
| - }
|
|
|
| - if (!fail)
|
| - log("PASS");
|
| +if (window.testRunner)
|
| + $('test').outerHTML = '';
|
| </script>
|
| +<script src="../../fast/js/resources/js-test-post.js"></script>
|
|
|