Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/vertical-lr-ltr-extend-line-forward-br.html

Issue 1463673003: Use w3c test harness in editing/selection/vertical-*.html tests 2/3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2015-11-20T17:03:46 Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/selection/vertical-rl-ltr-extend-line-forward-br.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/selection/vertical-lr-ltr-extend-line-forward-br.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/vertical-lr-ltr-extend-line-forward-br.html b/third_party/WebKit/LayoutTests/editing/selection/vertical-lr-ltr-extend-line-forward-br.html
index b365a5bd46e944bf5b740bb3902838f43317e46e..7f3175ff11da8d1421866cb22c1d2eabbb28ce50 100644
--- a/third_party/WebKit/LayoutTests/editing/selection/vertical-lr-ltr-extend-line-forward-br.html
+++ b/third_party/WebKit/LayoutTests/editing/selection/vertical-lr-ltr-extend-line-forward-br.html
@@ -1,21 +1,23 @@
<!DOCTYPE html>
-<html>
-<head>
-<meta http-equiv="content-type" content="text/html; charset=utf-8">
-<style> .selected { color: blue; } </style>
-</head>
-<body>
+<meta charset="utf-8">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
<p>This tests horizontal caret movement in vertical writing mode. "は猫である。" and "名前" must be selected.</p>
-<div id="test" style="height: 30ex; -webkit-writing-mode: vertical-lr; outline: none;" contenteditable>
-<p>吾輩は猫である。<br>名前はまだ無い。</p>
+<div style="height: 30ex; -webkit-writing-mode: vertical-lr; outline: none;" contenteditable>
+<p id="p1">吾輩は猫である。<br>名前はまだ無い。</p>
</div>
-<pre id="log"></pre>
+<div id="log"></div>
<script>
+test(function() {
+ var selection = window.getSelection();
+ var p1 = document.getElementById('p1');
+ selection.collapse(p1.firstChild, 2);
+ selection.modify('Extend', 'Forward', 'Line');
-var test = document.getElementById('test');
-window.getSelection().collapse(test.getElementsByTagName('p')[0].firstChild, 2);
-window.getSelection().modify('Extend', 'Forward', 'Line');
-
+ assert_false(selection.isCollapsed, 'isCollapsed');
+ assert_equals(selection.anchorNode, p1.firstChild, 'anchorNode');
+ assert_equals(selection.anchorOffset, 2, 'anchorOffset');
+ assert_equals(selection.focusNode, p1.lastChild, 'focusNode');
+ assert_equals(selection.focusOffset, 2, 'focusOffset');
+});
</script>
-</body>
-</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/selection/vertical-rl-ltr-extend-line-forward-br.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698