| Index: third_party/WebKit/LayoutTests/editing/style/remove-underline-from-stylesheet.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/style/remove-underline-from-stylesheet.html b/third_party/WebKit/LayoutTests/editing/style/remove-underline-from-stylesheet.html
|
| index 77f3edc2752ffcc8e796c3e9e8df35ed0fc189c3..26a09d1ae00b402af5ef7ae4868c964e55131aec 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/style/remove-underline-from-stylesheet.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/style/remove-underline-from-stylesheet.html
|
| @@ -1,46 +1,24 @@
|
| -<html>
|
| -<head>
|
| -<style>
|
| -.editing {
|
| - border: 2px solid red;
|
| - padding: 12px;
|
| - font-size: 24px;
|
| - text-decoration: underline;
|
| -}
|
| -</style>
|
| -<script src="../../resources/dump-as-markup.js"></script>
|
| -<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
|
| +<!doctype html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../assert_selection.js"></script>
|
| <script>
|
| + // Test for http://wkb.ug/27809
|
| + test(() => assert_selection(
|
| + [
|
| + '<style>.underline { text-decoration: underline; }</style>',
|
| + '<div class="underline" contenteditable>^abc|</div>',
|
| + ].join(''),
|
| + 'underline',
|
| + [
|
| + '<style>.underline { text-decoration: underline; }</style>',
|
| + '<div class="underline" contenteditable>^abc|</div>',
|
| + ].join('')),
|
| + 'Underline command does nothing when selected text has undeline (style sheet).');
|
|
|
| -function editingTest() {
|
| - if (window.testRunner)
|
| - testRunner.dumpAsText();
|
| - for (i = 0; i < 6; i++)
|
| - typeCharacterCommand();
|
| - typeCharacterCommand(' ');
|
| - for (i = 0; i < 6; i++)
|
| - typeCharacterCommand();
|
| - typeCharacterCommand(' ');
|
| - for (i = 0; i < 6; i++)
|
| - typeCharacterCommand();
|
| - moveSelectionBackwardByWordCommand();
|
| - moveSelectionBackwardByWordCommand();
|
| - extendSelectionForwardByWordCommand();
|
| - underlineCommand();
|
| - document.body.appendChild(document.createTextNode(document.getElementById('root').innerHTML));
|
| -}
|
| -
|
| -</script>
|
| -<title>Editing Test</title>
|
| -</head>
|
| -<body>
|
| -<div contenteditable id="root" class="editing">
|
| -<span id="test"></span>
|
| -</div>
|
| -<script>
|
| -Markup.description('This tests removing underline from stylesheet (.editing has underline). Because text-decoration that comes from a style rule cannot be pushed down, the underline should stay. (see bug 27809).');
|
| -runEditingTest();
|
| -Markup.dump('root');
|
| + test(() => assert_selection(
|
| + '<div contenteditable style="text-decoration: underline">^abc|</div>',
|
| + 'underline',
|
| + '<div contenteditable style="text-decoration: underline">^abc|</div>'),
|
| + 'Underline command does nothing when selected text has undeline (inline).');
|
| </script>
|
| -</body>
|
| -</html>
|
|
|