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

Unified Diff: third_party/WebKit/LayoutTests/editing/pasteboard/merge-end-blockquote.html

Issue 2181113003: Convert editing/pasteboard/merge-end-blockquote.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-26T18:15:54 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/pasteboard/merge-end-blockquote-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/pasteboard/merge-end-blockquote.html
diff --git a/third_party/WebKit/LayoutTests/editing/pasteboard/merge-end-blockquote.html b/third_party/WebKit/LayoutTests/editing/pasteboard/merge-end-blockquote.html
index 0d84b29c64ee1fd2f686237eba84ddb743037272..d5d42a68281d704c2ae8961bcced8e1e2bdbef8d 100644
--- a/third_party/WebKit/LayoutTests/editing/pasteboard/merge-end-blockquote.html
+++ b/third_party/WebKit/LayoutTests/editing/pasteboard/merge-end-blockquote.html
@@ -1,27 +1,32 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
<script>
-if (window.testRunner)
- testRunner.dumpEditingCallbacks();
-</script>
-<p>This tests pasting a Mail blockquote at the start of a paragraph. Blockquoting should be stripped.</p>
-<div id="test1" contenteditable="true">x</div>
-
-<script type="text/javascript" src="../editing.js"></script>
-<script>
-var e = document.getElementById("test1");
-var s = window.getSelection();
-
-setSelectionCommand(e, 0, e, 0);
-insertHTMLCommand("<blockquote type='cite'><div>Blockquoted Text</div></blockquote>");
-</script>
-
-<p>This tests pasting text into a Mail blockquote. The last bit of content in the incoming fragment should be merged with the paragraph after the position being pasted into.</p>
-<div id="test2" contenteditable="true"><blockquote type='cite'><div>Blockquoted Text</div></blockquote></div>
-
-<script>
-var e = document.getElementById("test2");
-var s = window.getSelection();
+test(() => assert_selection(
+ '<div contenteditable>|x</div>',
+ 'insertHTML <blockquote type="cite"><div>Blockquoted Text</div></blockquote>',
+ '<div contenteditable>Blockquoted Text|x</div>'),
+ 'Insert BLOCKQUOTE and strip it');
-setSelectionCommand(e, 0, e, 0);
-moveSelectionForwardByWordCommand();
-insertHTMLCommand("<div>foo</div><div>bar</div>");
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<blockquote type="cite">',
+ '<div>Blockquoted |Text</div>',
+ '</blockquote>',
+ '</div>',
+ ].join(''),
+ 'insertHTML <div>foo</div><div>bar</div>',
+ [
+ '<div contenteditable>',
+ '<blockquote type="cite">',
+ '<div>Blockquotedfoo</div>',
+ '</blockquote>',
+ '<blockquote type="cite">',
+ '<div>bar|Text</div>',
+ '</blockquote>',
+ '</div>',
+ ].join('')),
+ 'Paragraphs go into BLOCKQUOTE');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/editing/pasteboard/merge-end-blockquote-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698