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

Unified Diff: third_party/WebKit/LayoutTests/editing/execCommand/hilitecolor.html

Issue 2270693007: Convert editing/execCommand/hilitecolor.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-08-24T18:02:06 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/editing/execCommand/hilitecolor-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/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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/execCommand/hilitecolor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698