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

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

Issue 2937863002: Rewrite editing/inserting/typing-at-end-of-line.html to utilize assert_selection() (Closed)
Patch Set: 2017-06-14T12:50:16 Created 3 years, 6 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/platform/linux/editing/inserting/typing-at-end-of-line-expected.png » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <!doctype html>
2 <head> 2 <script src="../../resources/testharness.js"></script>
3 <title>Text does not split on white space when typing to the edge of window</tit le> 3 <script src="../../resources/testharnessreport.js"></script>
4 </head> 4 <script src="../assert_selection.js"></script>
5 <body style="overflow:hidden;">
6 <div>This test validates the fix for a bug that occurred when typing a blank at the end of a line when the character doesn't fix by a fraction of a pixel. If th e test runs correctly, you should see the word 'you' at the end of the line and the word 'have' at the beginning of the following line.</div>
7 <br>
8 <div id="test" contenteditable style="font: 12px 'lucida grande'; outline: solid blue; width: 871px; height: 100px;">
9 and Anna, you can do your regular weekly report run, and I'll extract the key se ctions into this. Andrew and Mark, I'd like to include any new bits you
10 </div>
11 </body>
12 <script> 5 <script>
13 const selection = getSelection(); 6 const style='font: 12px lucida\\ grande; width: 871px; height: 100px;';
14 selection.collapse(document.getElementById('test'), 0); 7 test(() => assert_selection(
15 selection.modify('move', 'forward', 'line'); 8 [
16 // Inserts text at end of line. 9 `<div contenteditable style="${style}">`,
17 document.execCommand('insertText', false, ' have'); 10 'and Anna, you can do your regular weekly report run, and I\'ll extract ',
11 'the key sections into this. Andrew and Mark, I\'d like to ',
12 '|include any new bits you',
13 '</div>',
14 ].join(''),
15 selection => selection.document.execCommand('insertText', false, ' have'),
16 [
17 `<div contenteditable style="${style}">`,
18 'and Anna, you can do your regular weekly report run, and I\'ll extract ',
19 'the key sections into this. Andrew and Mark, I\'d like to ',
20 '\u00A0have|include any new bits you',
21 '</div>',
22 ].join('')),
23 'Text does not split on white space when typing to the edge of window');
18 </script> 24 </script>
19 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/editing/inserting/typing-at-end-of-line-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698