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

Side by Side 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, 4 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../assert_selection.js"></script>
1 <script> 5 <script>
2 if (window.testRunner) 6 test(() => assert_selection(
3 testRunner.dumpEditingCallbacks(); 7 '<div contenteditable id="div">foo\n<div>bar</div></div>',
8 selection => {
9 var div = selection.document.getElementById("div");
10 var text = div.firstChild;
11 selection.collapse(text, text.length);
12 },
13 '<div contenteditable id="div">foo|\n<div>bar</div></div>'),
14 'Visible position creation in unrenderer space after renderer text.');
4 </script> 15 </script>
5 <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 'f oo' as being visually equivalent to the position just after 'foo', and not visua lly equivalent to the position on the next line, before 'bar'.</p>
6
7 <div id="div" contenteditable="true">foo
8 <div>bar</div></div>
9
10 <script>
11 var s = window.getSelection();
12 var div = document.getElementById("div");
13 var text = div.firstChild;
14
15 s.collapse(text, text.length);
16 </script>
17
OLDNEW
« 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