| Index: third_party/WebKit/LayoutTests/editing/inserting/typing-at-end-of-line.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/inserting/typing-at-end-of-line.html b/third_party/WebKit/LayoutTests/editing/inserting/typing-at-end-of-line.html
|
| index 419b9dae79e607370bcca110adafbe5f0796d117..9ff2e104ef10a05755f1b414c4df42d46875ec85 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/inserting/typing-at-end-of-line.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/inserting/typing-at-end-of-line.html
|
| @@ -1,19 +1,24 @@
|
| -<html>
|
| -<head>
|
| -<title>Text does not split on white space when typing to the edge of window</title>
|
| -</head>
|
| -<body style="overflow:hidden;">
|
| -<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 the 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>
|
| -<br>
|
| -<div id="test" contenteditable style="font: 12px 'lucida grande'; outline: solid blue; width: 871px; height: 100px;">
|
| -and Anna, you can do your regular weekly report run, and I'll extract the key sections into this. Andrew and Mark, I'd like to include any new bits you
|
| -</div>
|
| -</body>
|
| +<!doctype html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../assert_selection.js"></script>
|
| <script>
|
| -const selection = getSelection();
|
| -selection.collapse(document.getElementById('test'), 0);
|
| -selection.modify('move', 'forward', 'line');
|
| -// Inserts text at end of line.
|
| -document.execCommand('insertText', false, ' have');
|
| +const style='font: 12px lucida\\ grande; width: 871px; height: 100px;';
|
| +test(() => assert_selection(
|
| + [
|
| + `<div contenteditable style="${style}">`,
|
| + 'and Anna, you can do your regular weekly report run, and I\'ll extract ',
|
| + 'the key sections into this. Andrew and Mark, I\'d like to ',
|
| + '|include any new bits you',
|
| + '</div>',
|
| + ].join(''),
|
| + selection => selection.document.execCommand('insertText', false, ' have'),
|
| + [
|
| + `<div contenteditable style="${style}">`,
|
| + 'and Anna, you can do your regular weekly report run, and I\'ll extract ',
|
| + 'the key sections into this. Andrew and Mark, I\'d like to ',
|
| + '\u00A0have|include any new bits you',
|
| + '</div>',
|
| + ].join('')),
|
| + 'Text does not split on white space when typing to the edge of window');
|
| </script>
|
| -</html>
|
|
|