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/execCommand/indent-selection.html

Issue 2175633002: Convert editing/execCommand/indent-selection.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-22T16:55:59 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/execCommand/indent-selection-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/execCommand/indent-selection.html
diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/indent-selection.html b/third_party/WebKit/LayoutTests/editing/execCommand/indent-selection.html
index 20b016a15b0614a5487accf642c4f388670a34ce..73e055e085447ef62073482995a187680bfcdf54 100644
--- a/third_party/WebKit/LayoutTests/editing/execCommand/indent-selection.html
+++ b/third_party/WebKit/LayoutTests/editing/execCommand/indent-selection.html
@@ -1,32 +1,53 @@
+<!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>
-<div id="description">
-This test uses the execCommand to indent the text below.
-</div>
-<br>
-<div contenteditable="true">
-<span id="item1">Lorem</span><br>
-more Lorem!
-<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px;">
-ipsum<br>
-
-<ul>
-<li>Foo</li>
-<li>Bar</li>
-<li>Baz</li>
-</ul>
-Dolor
-</blockquote>
-Sum!<br>
-<span id="item2">Thing</span>
-</div>
-<script>
-var s = window.getSelection();
-var p1 = document.getElementById("item1");
-var p2 = document.getElementById("item2");
-s.collapse(p1, 0);
-s.setBaseAndExtent(p1, 0, p2, 2);
-document.execCommand("Indent", false, "");
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<span>^Lorem</span><br>',
+ 'more Lorem!',
+ '<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px;">',
+ 'ipsum<br>',
+ '<ul>',
+ '<li>Foo</li>',
+ '<li>Bar</li>',
+ '<li>Baz</li>',
+ '</ul>',
+ 'Dolor',
+ '</blockquote>',
+ 'Sum!<br>',
+ '<span>Thing|</span>',
+ '</div>',
+ ].join(''),
+ 'indent',
+ [
+ '<div contenteditable>',
+ '<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">',
+ '<span>^Lorem<br></span>',
+ 'more Lorem!',
+ '<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px;">',
+ 'ipsum',
+ '</blockquote>',
+ '</blockquote>',
+ '<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px;">',
+ '<ul>',
+ '<ul>',
+ '<li>Foo</li>',
+ '<li>Bar</li>',
+ '<li>Baz</li>',
+ '</ul>',
+ '</ul>',
+ '</blockquote>',
+ '<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">',
+ '<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px;">',
+ 'Dolor',
+ '</blockquote>',
+ 'Sum!<br>',
+ '<span>Thing|</span>',
+ '</blockquote>',
+ '</div>',
+ ].join('')),
+ 'Indent HTML fragment');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/editing/execCommand/indent-selection-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698