| Index: third_party/WebKit/LayoutTests/editing/inserting/insert-div-021.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/inserting/insert-div-021.html b/third_party/WebKit/LayoutTests/editing/inserting/insert-div-021.html
|
| index a21bae8f63fb46ea19c7b8fe76ebaf5ba83402a9..5c36c4cdea83b7070e0dfabfa9a089873c0fa81b 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/inserting/insert-div-021.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/inserting/insert-div-021.html
|
| @@ -1,31 +1,27 @@
|
| -<!DOCTYPE html>
|
| -<html>
|
| -<body>
|
| -<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
|
| -<div style="border: none; height: 12px"></div>
|
| -<span id="test">foo</span><br>bar
|
| -</div>
|
| -<script src="../../resources/dump-as-markup.js"></script>
|
| +<!doctype html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../assert_selection.js"></script>
|
| +<div id="log"></div>
|
| <script>
|
| -
|
| -if (window.testRunner)
|
| - testRunner.dumpEditingCallbacks();
|
| -
|
| -var root = document.getElementById('root');
|
| -root.focus();
|
| -window.getSelection().collapse(document.getElementById('test'), 0);
|
| -
|
| -for (i = 0; i < 4; i++)
|
| - window.getSelection().modify('move', 'forward', 'character');
|
| -
|
| -document.execCommand('Delete');
|
| -document.execCommand('InsertParagraph');
|
| -document.execCommand('InsertParagraph');
|
| -
|
| -Markup.description('Test inserting paragraphs: should see "foo", then an empty line, then "bar" in the next line.\n'+
|
| -'Fix for this bug: <rdar://problem/3924579> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline');
|
| -Markup.dump(root);
|
| -
|
| +test(() => assert_selection(
|
| + [
|
| + '<div contenteditable>',
|
| + '<div style="height: 12px"></div>',
|
| + 'foo<br>|bar',
|
| + '</div>',
|
| + ].join(''),
|
| + selection => {
|
| + selection.document.execCommand('delete');
|
| + selection.document.execCommand('insertParagraph');
|
| + selection.document.execCommand('insertParagraph');
|
| + },
|
| + [
|
| + '<div contenteditable>',
|
| + '<div style="height: 12px"></div>',
|
| + 'foo<div><br></div>',
|
| + '<div>|bar</div>',
|
| + '</div>',
|
| + ].join('')),
|
| + 'Insert visible newline after deleting');
|
| </script>
|
| -</body>
|
| -</html>
|
|
|