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

Unified Diff: third_party/WebKit/LayoutTests/editing/deleting/delete-to-end-of-paragraph.html

Issue 2333193002: Convert editing/deleting/delete-to-end-of-paragraph.html to use w3c test harness (Closed)
Patch Set: 2016-09-15T11:30:17 Created 4 years, 3 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/deleting/delete-to-end-of-paragraph-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/deleting/delete-to-end-of-paragraph.html
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/delete-to-end-of-paragraph.html b/third_party/WebKit/LayoutTests/editing/deleting/delete-to-end-of-paragraph.html
index c59da98c509631272bf1b935d4b8d86004085dce..01be2dc03ca1e03227fe8dd3a4c7a66dc436c271 100644
--- a/third_party/WebKit/LayoutTests/editing/deleting/delete-to-end-of-paragraph.html
+++ b/third_party/WebKit/LayoutTests/editing/deleting/delete-to-end-of-paragraph.html
@@ -1,31 +1,44 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-.editing {
- font-size: 24px;
- width: 600px;
-}
-</style>
-<title>Editing Test</title>
-</head>
-<body contenteditable id="root">
-<div id="test" class="editing">one two three</div><div>four five six</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>
<script>
+test(() => {
+ assert_not_equals(window.testRunner, undefined,
+ 'This test requires testRunner.');
-if (!window.testRunner)
- document.write("(cannot run interactively)");
-else {
- testRunner.dumpEditingCallbacks();
-
- getSelection().collapse(document.getElementById('test'), 0);
- // test for 4570218 by using double deleteToEndOfParagraph
- testRunner.execCommand("DeleteToEndOfParagraph");
- testRunner.execCommand("DeleteToEndOfParagraph");
- Markup.dump('test');
-}
+ assert_selection(
+ [
+ '<div contenteditable>',
+ '<div>|one two three</div>',
+ '<div>four five six</div>',
+ '</div>',
+ ].join(''),
+ selection => {
+ testRunner.execCommand('deleteToEndOfParagraph');
+ },
+ [
+ '<div contenteditable>',
+ '<div>|<br></div><div>four five six</div>',
+ '</div>',
+ ].join(''),
+ '1 Delete a paragraph');
+ assert_selection(
+ [
+ '<div contenteditable>',
+ '<div>|<br></div>',
+ '<div>four five six</div>',
+ '</div>',
+ ].join(''),
+ selection => {
+ testRunner.execCommand('deleteToEndOfParagraph');
+ },
+ [
+ '<div contenteditable>',
+ '<div>|four five six</div>',
+ '</div>',
+ ].join(''),
+ '2 Delete an empty paragraph');
+ }, 'Delete to end of paragraph');
</script>
-</body>
-</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/deleting/delete-to-end-of-paragraph-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698