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

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

Issue 2288113002: Convert editing/inserting/insert-div-021.html to use w3c test harness (Closed)
Patch Set: 2016-08-29T17:20:25 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/inserting/insert-div-021-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/inserting/insert-div-021.html
diff --git a/third_party/WebKit/LayoutTests/editing/inserting/insert-div-021.html b/third_party/WebKit/LayoutTests/editing/inserting/insert-div-021.html
index a21bae8f63fb46ea19c7b8fe76ebaf5ba83402a9..5c36c4cdea83b7070e0dfabfa9a089873c0fa81b 100644
--- a/third_party/WebKit/LayoutTests/editing/inserting/insert-div-021.html
+++ b/third_party/WebKit/LayoutTests/editing/inserting/insert-div-021.html
@@ -1,31 +1,27 @@
-<!DOCTYPE html>
-<html>
-<body>
-<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
-<div style="border: none; height: 12px"></div>
-<span id="test">foo</span><br>bar
-</div>
-<script src="../../resources/dump-as-markup.js"></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>
-
-if (window.testRunner)
- testRunner.dumpEditingCallbacks();
-
-var root = document.getElementById('root');
-root.focus();
-window.getSelection().collapse(document.getElementById('test'), 0);
-
-for (i = 0; i < 4; i++)
- window.getSelection().modify('move', 'forward', 'character');
-
-document.execCommand('Delete');
-document.execCommand('InsertParagraph');
-document.execCommand('InsertParagraph');
-
-Markup.description('Test inserting paragraphs: should see "foo", then an empty line, then "bar" in the next line.\n'+
-'Fix for this bug: <rdar://problem/3924579> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline');
-Markup.dump(root);
-
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ 'foo<br>|bar',
+ '</div>',
+ ].join(''),
+ selection => {
+ selection.document.execCommand('delete');
+ selection.document.execCommand('insertParagraph');
+ selection.document.execCommand('insertParagraph');
+ },
+ [
+ '<div contenteditable>',
+ '<div style="height: 12px"></div>',
+ 'foo<div><br></div>',
+ '<div>|bar</div>',
+ '</div>',
+ ].join('')),
+ 'Insert visible newline after deleting');
</script>
-</body>
-</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/inserting/insert-div-021-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698