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

Unified Diff: third_party/WebKit/LayoutTests/editing/execCommand/insert-list-items-inside-another-list.html

Issue 2757563004: Adjust insertion point when listifying unordered list items (Closed)
Patch Set: Patch rebased Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/editing/run/insertorderedlist-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/execCommand/insert-list-items-inside-another-list.html
diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/insert-list-items-inside-another-list.html b/third_party/WebKit/LayoutTests/editing/execCommand/insert-list-items-inside-another-list.html
new file mode 100644
index 0000000000000000000000000000000000000000..dcb3d5285acba5980d58105daff5ccf887cc9288
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/execCommand/insert-list-items-inside-another-list.html
@@ -0,0 +1,65 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<script>
+test(() => assert_selection(
+ '<div contenteditable><ul><li>|hello</li><li>world</li><li>Blink</li></ul></div>',
+ 'InsertOrderedList',
+ '<div contenteditable><ol><li>|hello</li></ol><ul><li>world</li><li>Blink</li></ul></div>'),
+ 'InsertOrderedList - listify only the 1st list item');
+
+test(() => assert_selection(
+ '<div contenteditable><ul><li>hello</li><li>|world</li><li>Blink</li></ul></div>',
+ 'InsertOrderedList',
+ '<div contenteditable><ul><li>hello</li></ul><ol><li>|world</li></ol><ul><li>Blink</li></ul></div>'),
+ 'InsertOrderedList - listify only the 2nd list item');
+
+test(() => assert_selection(
+ '<div contenteditable><ul><li>hello</li><li>world</li><li>|Blink</li></ul></div>',
+ 'InsertOrderedList',
+ '<div contenteditable><ul><li>hello</li><li>world</li></ul><ol><li>|Blink</li></ol></div>'),
+ 'InsertOrderedList - listify only the 3nd list item');
+
+test(() => assert_selection(
+ '<div contenteditable><ol><li>|hello</li><li>world</li><li>Blink</li></oll></div>',
+ 'InsertUnorderedList',
+ '<div contenteditable><ul><li>|hello</li></ul><ol><li>world</li><li>Blink</li></ol></div>'),
+ 'InsertUnorderedList - listify only the 1st list item');
+
+test(() => assert_selection(
+ '<div contenteditable><ol><li>hello</li><li>|world</li><li>Blink</li></ol></div>',
+ 'InsertUnorderedList',
+ '<div contenteditable><ol><li>hello</li></ol><ul><li>|world</li></ul><ol><li>Blink</li></ol></div>'),
+ 'InsertUnorderedList - listify only the 2nd list item');
+
+test(() => assert_selection(
+ '<div contenteditable><ol><li>hello</li><li>world</li><li>|Blink</li></ol></div>',
+ 'InsertUnorderedList',
+ '<div contenteditable><ol><li>hello</li><li>world</li></ol><ul><li>|Blink</li></ul></div>'),
+ 'InsertUnorderedList - listify only the 3rd list item');
+
+test(() => assert_selection(
+ '<div contenteditable><ul><li>^hello</li><li>world|</li><li>Blink</li></ul></div>',
+ 'InsertOrderedList',
+ '<div contenteditable><ol><li>^hello</li><li>world|</li></ol><ul><li>Blink</li></ul></div>'),
+ 'InsertOrderedList - listify the 1st and 2nd list items');
+
+test(() => assert_selection(
+ '<div contenteditable><ul><li>hello</li><li>^world</li><li>Blink|</li></ul></div>',
+ 'InsertOrderedList',
+ '<div contenteditable><ul><li>hello</li></ul><ol><li>^world</li><li>Blink|</li></ol></div>'),
+ 'InsertOrderedList - listify the 2nd and 3rd list items');
+
+test(() => assert_selection(
+ '<div contenteditable><ol><li>^hello</li><li>world|</li><li>Blink</li></ol></div>',
+ 'InsertUnorderedList',
+ '<div contenteditable><ul><li>^hello</li><li>world|</li></ul><ol><li>Blink</li></ol></div>'),
+ 'InsertUnorderedList - listify the 1st and 2nd list items');
+
+test(() => assert_selection(
+ '<div contenteditable><ol><li>hello</li><li>^world</li><li>Blink|</li></ol></div>',
+ 'InsertUnorderedList',
+ '<div contenteditable><ol><li>hello</li></ol><ul><li>^world</li><li>Blink|</li></ul></div>'),
+ 'InsertUnorderedList - listify the 2nd and 3rd list items');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/editing/run/insertorderedlist-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698