| Index: third_party/WebKit/LayoutTests/editing/selection/extend-by-character-003.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/selection/extend-by-character-003.html b/third_party/WebKit/LayoutTests/editing/selection/extend-by-character-003.html
|
| index 9e43e1df766948546be7afe324ce4f779fa240e3..b797b983cd8a660e0323b6e2f25c027558205f1e 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/selection/extend-by-character-003.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/selection/extend-by-character-003.html
|
| @@ -1,40 +1,28 @@
|
| -<html>
|
| -<head>
|
| -
|
| -<style>
|
| -.editing {
|
| - border: 2px solid red;
|
| - padding: 12px;
|
| - font-size: 24px;
|
| -}
|
| -</style>
|
| -<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
|
| -
|
| -<script>
|
| -
|
| -function editingTest() {
|
| - moveSelectionForwardByCharacterCommand();
|
| - moveSelectionForwardByCharacterCommand();
|
| - for (i = 0; i < 157; i++) {
|
| - extendSelectionForwardByCharacterCommand();
|
| - }
|
| -}
|
| -
|
| -</script>
|
| -
|
| -<title>Editing Test</title>
|
| -</head>
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| <body>
|
| <div contenteditable id="root" class="editing">
|
| -<span id="test"><i>F and seven</i> years <b> as </b>our fathers f upon this
|
| +<span id="span"><i>F and seven</i> years <b> as </b>our fathers f upon this
|
| continent, a new nation, conceived in Liberty, and dedicated to the
|
| proposition that all
|
| <br>men are created equal.</span>
|
| </div>
|
| -
|
| +<div id="log"></div>
|
| <script>
|
| -runEditingTest();
|
| +test(function () {
|
| + var selection = getSelection();
|
| + selection.collapse(span.firstChild.firstChild, 0);
|
| + selection.modify("move", "forward", "character");
|
| + selection.modify("move", "forward", "character");
|
| + for (i = 0; i < 157; i++) {
|
| + selection.modify("extend", "forward", "character");
|
| + }
|
| + assert_equals(selection.anchorNode, span.firstChild.firstChild);
|
| + assert_equals(selection.anchorOffset, 5);
|
| + assert_equals(selection.focusNode, span.childNodes[5]);
|
| + assert_equals(selection.focusOffset, 21);
|
| +});
|
| </script>
|
|
|
| </body>
|
| -</html>
|
|
|