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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/execCommand/queryCommandState-list.html

Issue 2268843002: queryCommandState should consider the nested list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp » ('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 <!doctype HTML>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <div>
5 <ol>
6 <li>First list item
7 <ul>
8 <li id="ul_list_item">Nested list item</li>
9 </ul>
10 </li>
11 </ol>
12 </div>
13 <div>
14 <ul>
15 <li>First list item
16 <ol>
17 <li id="ol_list_item">Nested list item</li>
18 </ol>
19 </li>
20 </ul>
21 </div>
22 <script>
23 test(function() {
24 document.getSelection().removeAllRanges();
25 var range = document.createRange();
26 range.selectNode(document.getElementById('ul_list_item'));
27 document.getSelection().addRange(range);
28
29 assert_equals(document.queryCommandState('insertOrderedList'), false);
30 assert_equals(document.queryCommandState('insertUnorderedList'), true);
31 }, 'run queryCommandState() on the unordered list item');
32
33 test(function() {
34 document.getSelection().removeAllRanges();
35 var range = document.createRange();
36 range.selectNode(document.getElementById('ol_list_item'));
37 document.getSelection().addRange(range);
38
39 assert_equals(document.queryCommandState('insertOrderedList'), true);
40 assert_equals(document.queryCommandState('insertUnorderedList'), false);
41 }, 'run queryCommandState() on the ordered list item');
42 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698