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

Unified Diff: third_party/WebKit/LayoutTests/editing/inserting/insert-paragraph-04.html

Issue 1456333002: Make layout tests in editing/inserting to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2015-11-19T14:56:35 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/inserting/insert-paragraph-04.html
diff --git a/third_party/WebKit/LayoutTests/editing/inserting/insert-paragraph-04.html b/third_party/WebKit/LayoutTests/editing/inserting/insert-paragraph-04.html
index 3d066423a15e6dba3e065b9074bbcb67c3ce7938..41c00c3e8ad0de0e365e985a30a1566089cd601b 100644
--- a/third_party/WebKit/LayoutTests/editing/inserting/insert-paragraph-04.html
+++ b/third_party/WebKit/LayoutTests/editing/inserting/insert-paragraph-04.html
@@ -1,18 +1,21 @@
-<script>
-if (window.testRunner)
- testRunner.dumpEditingCallbacks();
-</script>
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
<p>This tests inserting a paragraph separator after a horizontal rule. You should see 'foo', empty paragraph, horizontal rule, 'bar', and the caret should be just after the horizontal rule. <b>This demonstrates 8345. The caret after a horizontal rule is drawn in the same location as the caret before a horizontal rule.</p>
<div contenteditable="true" id="div">foo<hr>bar</div>
-
+<div id="log"></div>
<script>
-if (window.internals)
- internals.settings.setEditingBehavior('mac');
-var sel = window.getSelection();
-var div = document.getElementById("div");
-sel.collapse(div, 0);
-sel.modify("move", "forward", "word");
-sel.modify("move", "forward", "character");
-sel.modify("move", "forward", "character");
-document.execCommand("InsertParagraph");
+test(function() {
+ if (window.internals)
+ internals.settings.setEditingBehavior('mac');
+ var selection = window.getSelection();
+ var div = document.getElementById('div');
+ selection.collapse(div, 0);
+ selection.modify('move', 'forward', 'word');
+ selection.modify('move', 'forward', 'character');
+ selection.modify('move', 'forward', 'character');
+ document.execCommand('insertParagraph');
+
+ assert_equals(div.innerHTML, 'foo<hr><br>bar');
+});
</script>

Powered by Google App Engine
This is Rietveld 408576698