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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/execCommand/insert-list-and-stitch.html

Issue 1459783003: Make layout tests in editing/deleting and editing/execCommand to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 <script> 1 <!DOCTYPE html>
2 if (window.testRunner) 2 <script src="../../resources/testharness.js"></script>
3 testRunner.dumpEditingCallbacks(); 3 <script src="../../resources/testharnessreport.js"></script>
4 </script>
5 <p>The three items below should be stitched together into one ordered list when you click the button.</div> 4 <p>The three items below should be stitched together into one ordered list when you click the button.</div>
6 <div contenteditable="true"> 5 <div id="sample" contenteditable="true">
7 <div id="item1">foo</div> 6 <div id="item1">foo</div>
8 <div id="item2">bar</div> 7 <div id="item2">bar</div>
9 <div id="item3">baz</div> 8 <div id="item3">baz</div>
10 </div> 9 </div>
10 <div id="log"></div>
11 <script> 11 <script>
12 var s = window.getSelection(); 12 test(function() {
13 s.collapse(document.getElementById("item1"), 0); 13 var selection = window.getSelection();
14 document.execCommand("InsertOrderedList", false, ""); 14 selection.collapse(document.getElementById('item1'), 0);
15 s.collapse(document.getElementById("item2"), 0); 15 document.execCommand('InsertOrderedList');
16 document.execCommand("InsertOrderedList", false, ""); 16 selection.collapse(document.getElementById('item2'), 0);
17 s.collapse(document.getElementById("item3"), 0); 17 document.execCommand('InsertOrderedList');
18 document.execCommand("InsertOrderedList", false, ""); 18 selection.collapse(document.getElementById('item3'), 0);
19 document.execCommand('InsertOrderedList');
20
21 var sample = document.getElementById('sample');
22 assert_equals(sample.innerHTML, '\n<div id="item1"><ol><li>foo<br></li><li>b ar<br></li><li>baz<br></li></ol></div>\n\n\n');
23 });
19 </script> 24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698