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

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/unrendered-space.html

Issue 2184863003: Convert editing/selection/unrendered-space.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revised 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/unrendered-space-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/unrendered-space.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/unrendered-space.html b/third_party/WebKit/LayoutTests/editing/selection/unrendered-space.html
index 98179e5d9b4674b5dfc344665f39fb7edafb65b9..d921ba31686ccc0177ceea826738a012cacd047e 100644
--- a/third_party/WebKit/LayoutTests/editing/selection/unrendered-space.html
+++ b/third_party/WebKit/LayoutTests/editing/selection/unrendered-space.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();
+test(() => assert_selection(
+ '<div contenteditable id="div">foo\n<div>bar</div></div>',
+ selection => {
+ var div = selection.document.getElementById("div");
+ var text = div.firstChild;
+ selection.collapse(text, text.length);
+ },
+ '<div contenteditable id="div">foo|\n<div>bar</div></div>'),
+ 'Visible position creation in unrenderer space after renderer text.');
</script>
-<p>This tests visible position creation in unrendered space after rendered text, just before a new block. The caret should be at the end of the line containing 'foo' because we choose to treat all positions in the unrendered space after 'foo' as being visually equivalent to the position just after 'foo', and not visually equivalent to the position on the next line, before 'bar'.</p>
-
-<div id="div" contenteditable="true">foo
-<div>bar</div></div>
-
-<script>
-var s = window.getSelection();
-var div = document.getElementById("div");
-var text = div.firstChild;
-
-s.collapse(text, text.length);
-</script>
-
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/editing/selection/unrendered-space-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698