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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/extend-by-word-002.html

Issue 2535173009: Convert editing/selection/extend-by-word-002.html with assert_selection (Closed)
Patch Set: Add platform-dependent test results Created 4 years 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/extend-by-word-002-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3
4 <style>
5 .editing {
6 border: 2px solid red;
7 padding: 12px;
8 font-size: 24px;
9 }
10 .cell {
11 padding: 12px;
12 font-size: 24px;
13 height: 48px;
14 }
15
16 li {
17 font-size: 12px;
18 font-family: Verdana, Arial, sans-serif;
19 }
20
21 div.nav {
22 width:120px;
23 }
24
25 ul.menu, ul.menu li {
26 margin: 0;padding:0;
27 font-size:10px
28 }
29 ul.menu li { padding: 3px; padding-left: 1.6em; padding-right:5px; text-indent: -1.1em !important; text-indent: -.5em; }
30 ul.menu li:first-letter { font-size:20px;line-height:10px; }
31
32 </style>
33 <title>Editing Test</title>
34 </head>
35 <body>
36 <div id="container">
37 <div contenteditable id="root" class="editing" style="width:120px;">
38 <ul class="menu" id="test">
39 <li>&middot; <a href="detail.asp?cat=7">Appetizers</a></li>
40 <li>&middot; <a href="detail.asp?cat=13">Soups & Salads</a></li>
41 <li>&middot; <a href="detail.asp?cat=5">Sandwiches & Burgers</a></li>
42 <li>&middot; <a href="detail.asp?cat=14">Steak & Ribs</a></li>
43 <li>&middot; <a href="detail.asp?cat=11">Seafood</a></li>
44 <li>&middot; <a href="detail.asp?cat=17">Combos</a></li>
45 </ul>
46 </div>
47 </div>
48 <!--
49 Specifically checks test case in bug:
50 <rdar://problem/4244976> reproducible hang at ocharleys.com in VisiblePositi on::initDownstream
51 -->
52 <script src="../../resources/js-test.js"></script>
53 <script>
54 function $(id) { return document.getElementById(id); }
55 if (window.internals)
56 internals.settings.setEditingBehavior('mac');
57 var range = document.createRange();
58 range.setStart($("test").querySelectorAll("li")[0], 0);
59 var selection = window.getSelection();
60 selection.removeAllRanges();
61 selection.addRange(range);
62 for (var i = 0; i < 6; ++i)
63 selection.modify('extend', 'forward', 'word');
64 shouldBeEqualToString('selection.type', 'Range');
65 shouldBe('selection.anchorNode', '$("test").querySelectorAll("li")[0].childNodes [0]');
66 shouldBe('selection.anchorOffset', '0');
67 shouldBe('selection.focusNode', '$("test").querySelectorAll("li a")[3].firstChil d');
68 shouldBe('selection.focusOffset', '4');
69 if (window.testRunner)
70 $('container').outerHTML = '';
71 </script>
72 </body>
73 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/selection/extend-by-word-002-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698