Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: third_party/WebKit/LayoutTests/editing/style/remove-underline-from-stylesheet.html

Issue 2245393002: Convert editing/style/remove-underline-from-stylesheet.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-08-16T18:34:59 Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/mac/editing/style/remove-underline-from-stylesheet-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/mac/editing/style/remove-underline-from-stylesheet-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698