| Index: third_party/WebKit/LayoutTests/editing/execCommand/format-block-contenteditable-false.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/format-block-contenteditable-false.html b/third_party/WebKit/LayoutTests/editing/execCommand/format-block-contenteditable-false.html
|
| index deae85af85c049b0f653a188cc0ade2ead1d83bf..85dc9f85ee00accb0ebc360791e03369e34e2aaa 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/execCommand/format-block-contenteditable-false.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/execCommand/format-block-contenteditable-false.html
|
| @@ -1,32 +1,30 @@
|
| -<!DOCTYPE html>
|
| -<html>
|
| -<head>
|
| - <script src="../../resources/dump-as-markup.js"></script>
|
| -</head>
|
| -<body>
|
| - <div id="editorcontainer" contenteditable="true">
|
| - Will select from here
|
| - <div contenteditable="false">
|
| - over this contenteditable=false div
|
| - </div>
|
| - until here.
|
| - </div>
|
| -</body>
|
| +<!doctype html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../assert_selection.js"></script>
|
| <script>
|
| - Markup.description('formatblock on selection with a contenteditable="false" child.');
|
| -
|
| - var selection = window.getSelection();
|
| - selection.removeAllRanges();
|
| -
|
| - var container = document.getElementById('editorcontainer');
|
| - var range = document.createRange()
|
| - range.setStartBefore(container.firstChild);
|
| - range.setEndAfter(container.lastChild);
|
| - selection.addRange(range);
|
| -
|
| - document.execCommand('italic', false, "");
|
| - document.execCommand('formatblock', false, "<h1>");
|
| -
|
| - Markup.dump(container);
|
| +test(() => assert_selection(
|
| + [
|
| + '<div contenteditable>',
|
| + ' ^Will select from here',
|
| + ' <div contenteditable="false">',
|
| + ' over this contenteditable=false div',
|
| + ' </div>',
|
| + ' until here.|',
|
| + '</div>',
|
| + ].join('\n'),
|
| + selection => {
|
| + selection.document.execCommand('italic');
|
| + selection.document.execCommand('formatblock', false, '<h1>');
|
| + },
|
| + [
|
| + '<div contenteditable><h1><i>',
|
| + ' ^Will select from here',
|
| + ' </i><br><i>',
|
| + ' until here.|',
|
| + '</i></h1><div contenteditable="false">',
|
| + ' over this contenteditable=false div',
|
| + ' </div></div>',
|
| + ].join('\n')),
|
| + 'formatBlock with uneditable');
|
| </script>
|
| -</html>
|
|
|