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

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

Issue 2178863002: Convert editing/insert-div-22.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-25T17:34:19 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/inserting/insert-div-022-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-022.html
diff --git a/third_party/WebKit/LayoutTests/editing/inserting/insert-div-022.html b/third_party/WebKit/LayoutTests/editing/inserting/insert-div-022.html
index aa8e89a0f627f36cbb82aa99fc88dd7173841333..83c826ec82c6f3840fc1ad172f973f79126c3832 100644
--- a/third_party/WebKit/LayoutTests/editing/inserting/insert-div-022.html
+++ b/third_party/WebKit/LayoutTests/editing/inserting/insert-div-022.html
@@ -1,50 +1,23 @@
-<html>
-<head>
-
-<style>
-body {
- font-size: 24px;
-}
-.editing {
- border: 2px solid red;
- padding: 12px;
-}
-p {
- border: 2px solid blue;
- padding: 12px;
-}
-br {
- background-color: green;
-}
-
-</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();
- insertParagraphCommand();
- typeCharacterCommand();
-}
-
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<p id="test"><b>foo|</b><br>bar</p>',
+ '</div>',
+ ].join(''),
+ selection => {
+ selection.document.execCommand('insertParagraph');
+ selection.document.execCommand('insertText', false, 'x');
+ },
+ [
+ '<div contenteditable>',
+ '<p id="test"><b>foo</b></p>',
+ '<p id="test"><b>x|<br></b>bar</p>',
+ '</div>',
+ ].join('')),
+ 'Insert "x" before BR, since insertParagraph puts caret before BR');
</script>
-
-<title>Editing Test</title>
-</head>
-<body contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
-
-Test inserting paragraphs: should see "foo" in a blue box, then a blue box with with two lines in it: First line a bold "x"; second line a non-bold "bar". Fix for this bug:
-<a href="rdar://problem/3924579">&lt;rdar://problem/3927554&gt;</a> Style info applied to remainder of document after a newline is entered
-
-<div style="height: 12px"></div>
-
-<p id="test"><b>foo</b><br>bar</p>
-
-<script>
-runEditingTest();
-</script>
-
-</body>
-</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/editing/inserting/insert-div-022-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698