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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/inserting/insert-paragraph-at-end-of-line.html

Issue 2284353002: Convert editing/inserting/insert-paragraph-at-end-of-line.html to use w3c test harness (Closed)
Patch Set: 2016-08-29T17:35:26 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/inserting/insert-paragraph-at-end-of-line-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 <body> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../../resources/dump-as-markup.js"></script> 4 <script src="../assert_selection.js"></script>
5 <div id="log"></div>
5 <script> 6 <script>
6 7 test(() => assert_selection(
7 if (window.testRunner) 8 [
8 testRunner.dumpEditingCallbacks(); 9 '<div contenteditable>',
9 10 '<a href="#">1|</a><div>3</div>',
10 // Set up the div 11 '</div>',
11 var editable = document.createElement('div'); 12 ].join(''),
12 editable.contentEditable = true; 13 selection => {
13 editable.innerHTML = '<a href="#" id="anchor">1</a><div>3</div>'; 14 selection.document.execCommand('insertParagraph');
14 document.body.appendChild(editable); 15 selection.document.execCommand('insertText', false, '2');
15 editable.focus(); 16 },
16 17 [
17 // Edit it with execCommand 18 '<div contenteditable>',
18 var sel = window.getSelection(); 19 '<a href="#">1</a>',
19 sel.collapse(document.getElementById('anchor'), 1); 20 '<div>2|<br>',
20 document.execCommand("InsertParagraph"); 21 '<div>3</div>',
21 document.execCommand("InsertText", false, "2"); 22 '</div>',
22 23 '</div>',
23 Markup.description('This tests the fix for <rdar://problem/6633727> - Hitting re turn at the end of a line with an anchor jumps me to the bottom of the message.\ n'+ 24 ].join('')),
24 'If the test has passed, the numbers should be in order, and only "1" should be a link.'); 25 'Simulate hitting return at the end of line');
25 Markup.dump(editable);
26
27 </script> 26 </script>
28 </body>
29 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/inserting/insert-paragraph-at-end-of-line-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698