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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <meta charset="utf-8">
3 <head> 3 <script src="../../resources/testharness.js"></script>
4 <meta http-equiv="content-type" content="text/html; charset=utf-8"> 4 <script src="../../resources/testharnessreport.js"></script>
5 <style> .selected { color: blue; } </style>
6 </head>
7 <body>
8 <p>This tests horizontal caret movement in vertical writing mode. "は猫である。" and " 名前" must be selected.</p> 5 <p>This tests horizontal caret movement in vertical writing mode. "は猫である。" and " 名前" must be selected.</p>
9 <div id="test" style="height: 30ex; -webkit-writing-mode: vertical-lr; outline: none;" contenteditable> 6 <div style="height: 30ex; -webkit-writing-mode: vertical-lr; outline: none;" con tenteditable>
10 <p>吾輩は猫である。<br>名前はまだ無い。</p> 7 <p id="p1">吾輩は猫である。<br>名前はまだ無い。</p>
11 </div> 8 </div>
12 <pre id="log"></pre> 9 <div id="log"></div>
13 <script> 10 <script>
11 test(function() {
12 var selection = window.getSelection();
13 var p1 = document.getElementById('p1');
14 selection.collapse(p1.firstChild, 2);
15 selection.modify('Extend', 'Forward', 'Line');
14 16
15 var test = document.getElementById('test'); 17 assert_false(selection.isCollapsed, 'isCollapsed');
16 window.getSelection().collapse(test.getElementsByTagName('p')[0].firstChild, 2); 18 assert_equals(selection.anchorNode, p1.firstChild, 'anchorNode');
17 window.getSelection().modify('Extend', 'Forward', 'Line'); 19 assert_equals(selection.anchorOffset, 2, 'anchorOffset');
18 20 assert_equals(selection.focusNode, p1.lastChild, 'focusNode');
21 assert_equals(selection.focusOffset, 2, 'focusOffset');
22 });
19 </script> 23 </script>
20 </body>
21 </html>
OLDNEW
« 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