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

Unified Diff: third_party/WebKit/LayoutTests/editing/inserting/insert-div-025.html

Issue 2287263002: Convert editing/inserting/insert-div-025.html to use w3c test harness (Closed)
Patch Set: 2016-08-29T17:25:51 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/linux/editing/inserting/insert-div-025-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/inserting/insert-div-025.html
diff --git a/third_party/WebKit/LayoutTests/editing/inserting/insert-div-025.html b/third_party/WebKit/LayoutTests/editing/inserting/insert-div-025.html
index 739e5f6c6f81adb5b36bf35c5b86877a2122afa1..e3df01233c5fe33a6a158a2e391cbfab7d7e25fd 100644
--- a/third_party/WebKit/LayoutTests/editing/inserting/insert-div-025.html
+++ b/third_party/WebKit/LayoutTests/editing/inserting/insert-div-025.html
@@ -1,46 +1,20 @@
-<html>
-<head>
-
-<style>
-.editing {
- border: 2px solid red;
- padding: 12px;
- font-size: 24px;
-}
-.explanation {
- border: 2px solid blue;
- padding: 12px;
- font-size: 24px;
- margin-bottom: 24px;
-}
-</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>
+<div id="log"></div>
<script>
-
-function editingTest() {
- for (i = 0; i < 4; i++)
- moveSelectionForwardByCharacterCommand();
- insertParagraphCommand();
-}
-
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div>foo |bar</div>',
+ '</div>',
+ ].join(''),
+ 'insertParagraph',
+ [
+ '<div contenteditable>',
+ '<div>foo\u{00A0}</div><div>|bar</div>',
+ '</div>',
+ ].join('')),
+ 'Keep a space after insert paragraph');
</script>
-
-<title>Editing Test</title>
-</head>
-<body>
-<div class="explanation">
-Should see "foo" and "bar" each in a separate red box. Note that the "foo" text is really "foo ".
-There <b>must</b> be a space at the end of the line.
-</div>
-
-<div contenteditable="true" id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
-<div id="test" class="editing" spellcheck="false">foo bar</div>
-</div>
-
-<script>
-runEditingTest();
-</script>
-
-</body>
-</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/editing/inserting/insert-div-025-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698