Index: third_party/WebKit/LayoutTests/editing/selection/extend-by-character-001.html |
diff --git a/third_party/WebKit/LayoutTests/editing/selection/extend-by-character-001.html b/third_party/WebKit/LayoutTests/editing/selection/extend-by-character-001.html |
index 63db1c041acaba9df957e10c2d7283d162b1bc32..897a28730d15f02c4b4719702deb2c7c35adc1f6 100644 |
--- a/third_party/WebKit/LayoutTests/editing/selection/extend-by-character-001.html |
+++ b/third_party/WebKit/LayoutTests/editing/selection/extend-by-character-001.html |
@@ -1,37 +1,22 @@ |
-<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 < 7; i++) { |
- extendSelectionForwardByCharacterCommand(); |
- } |
-} |
- |
-</script> |
- |
-<title>Editing Test</title> |
-</head> |
+<!DOCTYPE html> |
yosin_UTC9
2016/03/17 04:25:41
Could you move them into editing/selection/modify_
|
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
<body> |
<div contenteditable id="root" class="editing"> |
-<span id="test">f oo bar baz</span> |
+<span id="span">f oo bar baz</span> |
</div> |
- |
+<div id="log"></div> |
<script> |
-runEditingTest(); |
+test(function () { |
+ var selection = getSelection(); |
+ selection.collapse(span.firstChild, 0); |
+ selection.modify("move", "forward", "character"); |
+ selection.modify("move", "forward", "character"); |
+ for (i = 0; i < 7; i++) { |
+ selection.modify("extend", "forward", "character"); |
+ } |
+ assert_equals(selection.toString(), "oo bar "); |
+}); |
</script> |
</body> |
-</html> |