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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/deleting/delete-to-end-of-paragraph.html

Issue 2333193002: Convert editing/deleting/delete-to-end-of-paragraph.html to use w3c test harness (Closed)
Patch Set: 2016-09-15T11:30:17 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/LayoutTests/editing/deleting/delete-to-end-of-paragraph-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!doctype html>
2 <html> 2 <script src="../../resources/testharness.js"></script>
3 <head> 3 <script src="../../resources/testharnessreport.js"></script>
4 <style> 4 <script src="../assert_selection.js"></script>
5 .editing {
6 font-size: 24px;
7 width: 600px;
8 }
9 </style>
10 <title>Editing Test</title>
11 </head>
12 <body contenteditable id="root">
13 <div id="test" class="editing">one two three</div><div>four five six</div>
14 <script src="../../resources/dump-as-markup.js"></script>
15 <script> 5 <script>
6 test(() => {
7 assert_not_equals(window.testRunner, undefined,
8 'This test requires testRunner.');
16 9
17 if (!window.testRunner) 10 assert_selection(
18 document.write("(cannot run interactively)"); 11 [
19 else { 12 '<div contenteditable>',
20 testRunner.dumpEditingCallbacks(); 13 '<div>|one two three</div>',
14 '<div>four five six</div>',
15 '</div>',
16 ].join(''),
17 selection => {
18 testRunner.execCommand('deleteToEndOfParagraph');
19 },
20 [
21 '<div contenteditable>',
22 '<div>|<br></div><div>four five six</div>',
23 '</div>',
24 ].join(''),
25 '1 Delete a paragraph');
21 26
22 getSelection().collapse(document.getElementById('test'), 0); 27 assert_selection(
23 // test for 4570218 by using double deleteToEndOfParagraph 28 [
24 testRunner.execCommand("DeleteToEndOfParagraph"); 29 '<div contenteditable>',
25 testRunner.execCommand("DeleteToEndOfParagraph"); 30 '<div>|<br></div>',
26 Markup.dump('test'); 31 '<div>four five six</div>',
27 } 32 '</div>',
28 33 ].join(''),
34 selection => {
35 testRunner.execCommand('deleteToEndOfParagraph');
36 },
37 [
38 '<div contenteditable>',
39 '<div>|four five six</div>',
40 '</div>',
41 ].join(''),
42 '2 Delete an empty paragraph');
43 }, 'Delete to end of paragraph');
29 </script> 44 </script>
30 </body>
31 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/deleting/delete-to-end-of-paragraph-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698