| Index: third_party/WebKit/LayoutTests/editing/execCommand/hilitecolor.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/hilitecolor.html b/third_party/WebKit/LayoutTests/editing/execCommand/hilitecolor.html
|
| index c12892241ee4cef4065208da77c9d671f7293a10..7361498de66e0f81235a2c221cf5eeeb4e2d144d 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/execCommand/hilitecolor.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/execCommand/hilitecolor.html
|
| @@ -1,20 +1,15 @@
|
| -<script src="../../resources/dump-as-markup.js"></script>
|
| -<div id="test" contenteditable="true">The second word, and only the second word of this sentence should have a red background color.</div>
|
| +<!doctype html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../assert_selection.js"></script>
|
| <script>
|
| -if (window.internals)
|
| - internals.settings.setEditingBehavior('mac');
|
| -if (window.testRunner)
|
| - testRunner.dumpEditingCallbacks();
|
| -
|
| -var sel = window.getSelection();
|
| -var e = document.getElementById("test");
|
| -
|
| -sel.collapse(e, 0);
|
| -sel.modify("move", "forward", "word");
|
| -sel.modify("move", "forward", "word");
|
| -sel.modify("extend", "backward", "word");
|
| -document.execCommand("HiliteColor", false, "red");
|
| -sel.modify("move", "backward", "line");
|
| -
|
| -Markup.dump('test')
|
| + test(() => assert_selection(
|
| + '<div contenteditable>foo ^bar| baz</div>',
|
| + 'hilitecolor red',
|
| + [
|
| + '<div contenteditable>',
|
| + 'foo <span style="background-color: red;">^bar|</span> baz',
|
| + '</div>',
|
| + ].join('')),
|
| + 'set background color for "bar"');
|
| </script>
|
|
|