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/selection/table-caret-1.html

Issue 2183413002: Convert editing/selection/table-caret-1.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/table-caret-1-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/table-caret-1.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/table-caret-1.html b/third_party/WebKit/LayoutTests/editing/selection/table-caret-1.html
index ee137f8452df3d3dc523f3a0f76097f8d08900f6..d6c10ec17ad90a97b29d337370c9212be9198bdc 100644
--- a/third_party/WebKit/LayoutTests/editing/selection/table-caret-1.html
+++ b/third_party/WebKit/LayoutTests/editing/selection/table-caret-1.html
@@ -1,20 +1,22 @@
+<!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>
-<style>
-table, td {
- border: 1px solid #999;
-}
-</style>
-
-<p>This tests the caret position for the caret before a block table.</p>
-
-<div contenteditable="true">foo<table id="test"><tr><td>this</td></tr><tr><td>is</td></tr><tr><td>a table</td></tr></table>baz</div>
-
-<script>
-var s = window.getSelection();
-var e = document.getElementById("test");
-
-s.collapse(e, 0);
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ 'foo',
+ '<table><tr><td>this</td></tr><tr><td>is</td></tr><tr><td>a table</td></tr></table>',
+ 'baz',
+ '</div>'
+ ].join(''),
+ selection => selection.collapse(selection.document.querySelector('table'), 0),
+ [
+ '<div contenteditable>',
+ 'foo',
+ '|<table><tbody><tr><td>this</td></tr><tr><td>is</td></tr><tr><td>a table</td></tr></tbody></table>',
+ 'baz',
+ '</div>'
+ ].join('')), 'Place the caret before a block table.');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/editing/selection/table-caret-1-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698