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

Side by Side Diff: LayoutTests/editing/selection/skip-over-contenteditable.html

Issue 20572005: Allow selection to skip over contenteditable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Work around minor platform differences in test Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/editing/selection/skip-over-contenteditable-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <body>
4 <script src="../../fast/js/resources/js-test-pre.js"></script>
5
6 <p id="before">Before the contenteditable</p>
7 <div contentEditable></div>
8 <p id="after">After the contenteditable</p>
9
10 <div id="console"></div>
11 <script>
12 description("Ensure that extending a selection skips past a contentEditable.");
13
14 var before = document.getElementById("before");
15 var after = document.getElementById("after");
16
17 var sel = window.getSelection();
18 sel.setBaseAndExtent(before, 0, before, 6);
19 sel.modify("extend", "forward", "character");
20 shouldBe("sel.focusNode", "after");
21
22 sel.setBaseAndExtent(after, 5, after, 0);
23 sel.modify("extend", "backward", "character");
24 shouldBe("sel.focusNode.parentElement", "before");
25
26 sel.setBaseAndExtent(before, 0, before, 6);
27 sel.modify("extend", "forward", "word");
28 shouldBe("sel.focusNode.parentElement", "after");
29
30 sel.setBaseAndExtent(after, 5, after, 0);
31 sel.modify("extend", "backward", "word");
32 shouldBe("sel.focusNode.parentElement", "before");
33
34 sel.setBaseAndExtent(before, 0, before, 6);
35 sel.modify("extend", "forward", "line");
36 shouldBe("sel.focusNode.parentElement", "after");
37
38 sel.setBaseAndExtent(after, 5, after, 0);
39 sel.modify("extend", "backward", "line");
40 shouldBe("sel.focusNode.parentElement", "before");
41 </script>
42
43 <script src="../../fast/js/resources/js-test-post.js"></script>
44 </body>
45 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/selection/skip-over-contenteditable-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698