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

Side by Side Diff: LayoutTests/editing/selection/place-caret-on-single-click-within-selected-readonly-text.html

Issue 268993002: For non-editable content, selection editor commands are disabled Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 </head>
5 <body>
6 <p id="description"></p>
7 <p>To manually test it, first select non-editable content using mouse. Then clic k within the selected range. Now try to select using key combinations. It should allow you to do so.</p>
8 <p id="target">Some Text</p>
9 <div id="console"></div>
10 <script>
11 description("This tests caret placement when clicked once on existing selection in readonly texts to allow further selection using keys.")
12 if (window.testRunner) {
13 testRunner.overridePreference("WebKitEnableCaretBrowsing", false);
14 testRunner.dumpAsText();
15
16 target = document.getElementById('target');
17 target.focus();
18
19 eventSender.mouseMoveTo(target.offsetLeft, target.offsetTop);
20 eventSender.mouseDown();
21 eventSender.mouseMoveTo(target.offsetLeft + target.offsetWidth, target.o ffsetTop);
22 eventSender.mouseUp();
23
24 eventSender.mouseMoveTo(target.offsetLeft + (target.offsetWidth / 3), ta rget.offsetTop);
25 eventSender.mouseDown();
26 eventSender.mouseUp();
27 shouldBeEqualToString("getSelection().type", "Caret");
28 }
29 </script>
30 </body>
31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698