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

Unified Diff: third_party/WebKit/LayoutTests/editing/style/style-3998892-fix.html

Issue 2183763003: Convert editing/style/style-3998892-fix.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/linux/editing/style/style-3998892-fix-expected.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/style/style-3998892-fix.html
diff --git a/third_party/WebKit/LayoutTests/editing/style/style-3998892-fix.html b/third_party/WebKit/LayoutTests/editing/style/style-3998892-fix.html
index a27962cd69f26b4abc84d65779b1334eea45ca9f..1cf1526317db661fcce4adbd6dc7e352a977a479 100644
--- a/third_party/WebKit/LayoutTests/editing/style/style-3998892-fix.html
+++ b/third_party/WebKit/LayoutTests/editing/style/style-3998892-fix.html
@@ -1,61 +1,11 @@
-<html>
-<head>
-
-<style>
-.editing {
- border: 2px solid red;
- font-size: 24px;
-}
-.explanation {
- border: 2px solid blue;
- padding: 12px;
- font-size: 24px;
- margin-bottom: 24px;
-}
-.scenario { margin-bottom: 16px;}
-.scenario:first-line { font-weight: bold; margin-bottom: 16px;}
-.expected-results:first-line { font-weight: bold }
-</style>
-<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>
-
-function editingTest() {
- for (i = 0; i < 3; i++)
- moveSelectionForwardByCharacterCommand();
- extendSelectionForwardByLineCommand();
- boldCommand();
-}
-
+test(() => assert_selection(
+ '<div contenteditable><div>foo^</div><div>bar|</div></div>',
+ 'bold',
+ '<div contenteditable><div>foo^</div><div><b>bar|</b></div></div>'),
+ 'Bolding a selection from end of line should not change unselected text on starting line.');
</script>
-
-<title>Editing Test</title>
-</head>
-<body>
-
-<div class="explanation">
-<div class="scenario">
-Tests:
-<br>
-Bug fix for <a href="rdar://problem/3998892">&lt;rdar://problem/3998892&gt;</a> REGRESSION (Mail): bolding a selection
-from end of line changes unselected text on starting line.
-</div>
-<div class="expected-results">
-Expected Results:
-<br>
-Should see first line ("foo") not bold; second line ("bar") bold.
-</div>
-</div>
-
-<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
-<div id="test" class="editing">
-<div>foo</div>
-<div>bar</div>
-</div>
-
-<script>
-runEditingTest();
-</script>
-
-</body>
-</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/editing/style/style-3998892-fix-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698