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

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

Issue 2180833002: Convert editing/insert-div-20.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-25T15:47:23 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-020-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-020.html
diff --git a/third_party/WebKit/LayoutTests/editing/inserting/insert-div-020.html b/third_party/WebKit/LayoutTests/editing/inserting/insert-div-020.html
index 822847472745ddbad2bfa130014012bcfda33642..f9bfdda7c501b8da82f7e8272f82afce7c2e3a79 100644
--- a/third_party/WebKit/LayoutTests/editing/inserting/insert-div-020.html
+++ b/third_party/WebKit/LayoutTests/editing/inserting/insert-div-020.html
@@ -1,45 +1,19 @@
-<html>
-<head>
-
-<style>
-body {
- font-size: 24px;
-}
-.editing {
- border: 2px solid red;
- padding: 12px;
-}
-div {
- border: 2px solid blue;
- padding: 12px;
-}
-
-</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 < 5; i++)
- moveSelectionForwardByCharacterCommand();
- insertParagraphCommand();
-}
-
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<span id="test">foo</span><br><br>|bar',
+ '</div>',
+ ].join(''),
+ 'insertParagraph',
+ [
+ '<div contenteditable>',
+ '<span id="test">foo</span><br><br><br><div>|bar</div>',
+ '</div>',
+ ].join('')),
+ 'Insert BR and enclose "bar" with DIV');
</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 a blue box with "bar" in it, and two blank lines between "foo" and "bar".
-
-<div style="border: none; height: 12px"></div>
-
-<span id="test">foo</span><br><br>bar
-
-<script>
-runEditingTest();
-</script>
-
-</body>
-</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/editing/inserting/insert-div-020-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698