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..ea3493ab546bb24d05cfebaaad5721f2a6adb208 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/editing/execCommand/insert-list-items-inside-another-list.html |
@@ -0,0 +1,66 @@ |
+<!doctype html> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script src="../assert_selection.js"></script> |
+<div id="log"></div> |
yosin_UTC9
2017/03/24 04:46:53
nit: We don't need to have this DIV.
|
+<script> |
+test(() => assert_selection( |
+ '<div contenteditable><ul><li>|hello</li><li>world</li><li>WebKit</li></ul></div>', |
yosin_UTC9
2017/03/24 04:46:53
nit(optional): It is nice if we use term "Blink".
|
+ 'InsertOrderedList', |
+ '<div contenteditable><ol><li>|hello</li></ol><ul><li>world</li><li>WebKit</li></ul></div>'), |
+ 'InsertOrderedList - listify only the 1st list item'); |
+ |
+test(() => assert_selection( |
+ '<div contenteditable><ul><li>hello</li><li>|world</li><li>WebKit</li></ul></div>', |
+ 'InsertOrderedList', |
+ '<div contenteditable><ul><li>hello</li></ul><ol><li>|world</li></ol><ul><li>WebKit</li></ul></div>'), |
+ 'InsertOrderedList - listify only the 2nd list item'); |
+ |
+test(() => assert_selection( |
+ '<div contenteditable><ul><li>hello</li><li>world</li><li>|WebKit</li></ul></div>', |
+ 'InsertOrderedList', |
+ '<div contenteditable><ul><li>hello</li><li>world</li></ul><ol><li>|WebKit</li></ol></div>'), |
+ 'InsertOrderedList - listify only the 3nd list item'); |
+ |
+test(() => assert_selection( |
+ '<div contenteditable><ol><li>|hello</li><li>world</li><li>WebKit</li></oll></div>', |
+ 'InsertUnorderedList', |
+ '<div contenteditable><ul><li>|hello</li></ul><ol><li>world</li><li>WebKit</li></ol></div>'), |
+ 'InsertUnorderedList - listify only the 1st list item'); |
+ |
+test(() => assert_selection( |
+ '<div contenteditable><ol><li>hello</li><li>|world</li><li>WebKit</li></ol></div>', |
+ 'InsertUnorderedList', |
+ '<div contenteditable><ol><li>hello</li></ol><ul><li>|world</li></ul><ol><li>WebKit</li></ol></div>'), |
+ 'InsertUnorderedList - listify only the 2nd list item'); |
+ |
+test(() => assert_selection( |
+ '<div contenteditable><ol><li>hello</li><li>world</li><li>|WebKit</li></ol></div>', |
+ 'InsertUnorderedList', |
+ '<div contenteditable><ol><li>hello</li><li>world</li></ol><ul><li>|WebKit</li></ul></div>'), |
+ 'InsertUnorderedList - listify only the 3rd list item'); |
+ |
+test(() => assert_selection( |
+ '<div contenteditable><ul><li>^hello</li><li>world|</li><li>WebKit</li></ul></div>', |
+ 'InsertOrderedList', |
+ '<div contenteditable><ol><li>^hello</li><li>world|</li></ol><ul><li>WebKit</li></ul></div>'), |
+ 'InsertOrderedList - listify the 1st and 2nd list items'); |
+ |
+test(() => assert_selection( |
+ '<div contenteditable><ul><li>hello</li><li>^world</li><li>WebKit|</li></ul></div>', |
+ 'InsertOrderedList', |
+ '<div contenteditable><ul><li>hello</li></ul><ol><li>^world</li><li>WebKit|</li></ol></div>'), |
+ 'InsertOrderedList - listify the 2nd and 3rd list items'); |
+ |
+test(() => assert_selection( |
+ '<div contenteditable><ol><li>^hello</li><li>world|</li><li>WebKit</li></ol></div>', |
+ 'InsertUnorderedList', |
+ '<div contenteditable><ul><li>^hello</li><li>world|</li></ul><ol><li>WebKit</li></ol></div>'), |
+ 'InsertUnorderedList - listify the 1st and 2nd list items'); |
+ |
+test(() => assert_selection( |
+ '<div contenteditable><ol><li>hello</li><li>^world</li><li>WebKit|</li></ol></div>', |
+ 'InsertUnorderedList', |
+ '<div contenteditable><ol><li>hello</li></ol><ul><li>^world</li><li>WebKit|</li></ul></div>'), |
+ 'InsertUnorderedList - listify the 2nd and 3rd list items'); |
+</script> |