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

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/image-before-linebreak.html

Issue 2189503003: Convert editing/selection/image-before-linebreak.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove expected result files 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/selection/image-before-linebreak-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/selection/image-before-linebreak.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/image-before-linebreak.html b/third_party/WebKit/LayoutTests/editing/selection/image-before-linebreak.html
index 370ab74f9f663fe3ee06b822db1449ccfbd2d0e6..2f07f1dbb257f36849935df20e649e12d5fcac75 100644
--- a/third_party/WebKit/LayoutTests/editing/selection/image-before-linebreak.html
+++ b/third_party/WebKit/LayoutTests/editing/selection/image-before-linebreak.html
@@ -1,17 +1,15 @@
+<!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>Only the line break after the image should be selected.</p>
-<hr>
-<div contenteditable="true" id="div"><img src="../resources/abe.png"><br>foo</div>
-
-<script>
-if (window.testRunner)
- window.testRunner.dumpSelectionRect();
-
-var e = document.getElementById("div");
-var s = window.getSelection();
-// Select the line break
-s.setBaseAndExtent(e, 1, e, 2);
+test(() => assert_selection(
+ '<div contenteditable id="div"><img src="../resources/abe.png"><br>foo</div>',
+ selection => {
+ // Select the line break
+ var e = selection.document.getElementById("div");
+ selection.setBaseAndExtent(e, 1, e, 2);
+ },
+ '<div contenteditable id="div"><img src="../resources/abe.png">^<br>|foo</div>'),
+ 'Only the line break after the image should be selected.');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/editing/selection/image-before-linebreak-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698