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/execCommand/remove-list-item-1.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/remove-list-item-1.html
diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/remove-list-item-1.html b/third_party/WebKit/LayoutTests/editing/execCommand/remove-list-item-1.html
index 6fe652a4161585633ac841827a1d47a57f870348..6f85f7adbf64afae3c4363330e38a546852e7b50 100644
--- a/third_party/WebKit/LayoutTests/editing/execCommand/remove-list-item-1.html
+++ b/third_party/WebKit/LayoutTests/editing/execCommand/remove-list-item-1.html
@@ -1,16 +1,20 @@
-<script>
-if (window.testRunner)
- testRunner.dumpEditingCallbacks();
-</script>
-<body>
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
<p>Outdenting a sublist should remove one level.</p>
<div id="div" contentEditable="true"><ul><ul><li>foo</li></ul></ul></div>
-
+<div id="log"></div>
<script>
-var div = document.getElementById("div");
-var sel = window.getSelection();
+test(function() {
+ var div = document.getElementById('div');
+ var selection = window.getSelection();
+
+ selection.collapse(div, 0);
+ document.execCommand('Outdent');
-sel.collapse(div, 0);
-document.execCommand("Outdent");
+ assert_equals(div.innerHTML, '<ul><li>foo<br></li></ul>');
+ assert_true(selection.isCollapsed);
+ assert_equals(selection.anchorNode, div.querySelector('li').firstChild);
+ assert_equals(selection.anchorOffset, 0);
+});
</script>
-</body>

Powered by Google App Engine
This is Rietveld 408576698