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

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

Issue 20681004: Make first-letter style to work with editing Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-09-20T18:27:32 Created 7 years, 3 months 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 3
4 <style> 4 <style>
5 .editing { 5 .editing {
6 border: 2px solid red; 6 border: 2px solid red;
7 padding: 12px; 7 padding: 12px;
8 font-size: 24px; 8 font-size: 24px;
9 } 9 }
10 .cell { 10 .cell {
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 ul.menu, ul.menu li { 25 ul.menu, ul.menu li {
26 margin: 0;padding:0; 26 margin: 0;padding:0;
27 font-size:10px 27 font-size:10px
28 } 28 }
29 ul.menu li { padding: 3px; padding-left: 1.6em; padding-right:5px; text-indent: -1.1em !important; text-indent: -.5em; } 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; } 30 ul.menu li:first-letter { font-size:20px;line-height:10px; }
31 31
32 </style> 32 </style>
33 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script >
34
35 <script>
36
37 function editingTest() {
38 for (i = 0; i < 6; i++)
39 extendSelectionForwardByWordCommand();
40 }
41
42 </script>
43
44 <title>Editing Test</title> 33 <title>Editing Test</title>
45 </head> 34 </head>
46 <body> 35 <body>
36 <div id="container">
47 <div contenteditable id="root" class="editing" style="width:120px;"> 37 <div contenteditable id="root" class="editing" style="width:120px;">
48 <ul class="menu" id="test"> 38 <ul class="menu" id="test">
49 <li>&middot; <a href="detail.asp?cat=7">Appetizers</a></li> 39 <li>&middot; <a href="detail.asp?cat=7">Appetizers</a></li>
50 <li>&middot; <a href="detail.asp?cat=13">Soups & Salads</a></li> 40 <li>&middot; <a href="detail.asp?cat=13">Soups & Salads</a></li>
51 <li>&middot; <a href="detail.asp?cat=5">Sandwiches & Burgers</a></li> 41 <li>&middot; <a href="detail.asp?cat=5">Sandwiches & Burgers</a></li>
52 <li>&middot; <a href="detail.asp?cat=14">Steak & Ribs</a></li> 42 <li>&middot; <a href="detail.asp?cat=14">Steak & Ribs</a></li>
53 <li>&middot; <a href="detail.asp?cat=11">Seafood</a></li> 43 <li>&middot; <a href="detail.asp?cat=11">Seafood</a></li>
54 <li>&middot; <a href="detail.asp?cat=17">Combos</a></li> 44 <li>&middot; <a href="detail.asp?cat=17">Combos</a></li>
55 </ul> 45 </ul>
56 </div> 46 </div>
57 47 </div>
58 <!-- 48 <!--
59 Specifically checks test case in bug: 49 Specifically checks test case in bug:
60 <rdar://problem/4244976> reproducible hang at ocharleys.com in VisiblePositi on::initDownstream 50 <rdar://problem/4244976> reproducible hang at ocharleys.com in VisiblePositi on::initDownstream
61 --> 51 -->
62 52 <script src="../../fast/js/resources/js-test-pre.js"></script>
63 <script> 53 <script>
54 function $(id) { return document.getElementById(id); }
64 if (window.internals) 55 if (window.internals)
65 internals.settings.setEditingBehavior('mac'); 56 internals.settings.setEditingBehavior('mac');
66 runEditingTest(); 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].firstChild ');
66 shouldBe('selection.anchorOffset', '0');
67 shouldBe('selection.focusNode', '$("test").querySelectorAll("li a")[3].firstChil d');
68 shouldBe('selection.focusOffset', '5');
69 if (window.testRunner)
70 $('container').outerHTML = '';
67 </script> 71 </script>
68 72 <script src="../../fast/js/resources/js-test-post.js"></script>
69 </body> 73 </body>
70 </html> 74 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698