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/insert-list-and-stitch.html

Issue 1459783003: Make layout tests in editing/deleting and editing/execCommand to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
Index: third_party/WebKit/LayoutTests/editing/execCommand/insert-list-and-stitch.html
diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/insert-list-and-stitch.html b/third_party/WebKit/LayoutTests/editing/execCommand/insert-list-and-stitch.html
index 0c81bea3e10a0dfc947b4c8a0aa355ea42314d2a..a3823558e70d56bff36162593316aa093f5360d5 100644
--- a/third_party/WebKit/LayoutTests/editing/execCommand/insert-list-and-stitch.html
+++ b/third_party/WebKit/LayoutTests/editing/execCommand/insert-list-and-stitch.html
@@ -1,19 +1,24 @@
-<script>
-if (window.testRunner)
- testRunner.dumpEditingCallbacks();
-</script>
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
<p>The three items below should be stitched together into one ordered list when you click the button.</div>
-<div contenteditable="true">
+<div id="sample" contenteditable="true">
<div id="item1">foo</div>
<div id="item2">bar</div>
<div id="item3">baz</div>
</div>
+<div id="log"></div>
<script>
-var s = window.getSelection();
-s.collapse(document.getElementById("item1"), 0);
-document.execCommand("InsertOrderedList", false, "");
-s.collapse(document.getElementById("item2"), 0);
-document.execCommand("InsertOrderedList", false, "");
-s.collapse(document.getElementById("item3"), 0);
-document.execCommand("InsertOrderedList", false, "");
+test(function() {
+ var selection = window.getSelection();
+ selection.collapse(document.getElementById('item1'), 0);
+ document.execCommand('InsertOrderedList');
+ selection.collapse(document.getElementById('item2'), 0);
+ document.execCommand('InsertOrderedList');
+ selection.collapse(document.getElementById('item3'), 0);
+ document.execCommand('InsertOrderedList');
+
+ var sample = document.getElementById('sample');
+ assert_equals(sample.innerHTML, '\n<div id="item1"><ol><li>foo<br></li><li>bar<br></li><li>baz<br></li></ol></div>\n\n\n');
+});
</script>

Powered by Google App Engine
This is Rietveld 408576698