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, 6 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 <body>
3 <p id="target">Some Text</p>
4 <p>This tests caret placement when clicked once on existing selection in readonl y texts to allow further selection using keys.</p>
Yuta Kitamura 2014/06/04 08:19:38 You can use description() function from js-test to
b.rout 2014/06/04 12:53:04 Ok.
5 <div id="console"></div>
Yuta Kitamura 2014/06/04 08:19:38 js-test automatically creates the element for outp
b.rout 2014/06/04 12:53:04 Actually, I want the HTML content to come before t
6 <script src="../../resources/js-test.js"></script>
7 <script>
8 if (window.testRunner) {
Yuta Kitamura 2014/06/04 08:19:38 As a general rule, it is recommended to make the t
b.rout 2014/06/04 12:53:04 Ok. I will update the tests with instructions to m
9 testRunner.overridePreference("WebKitEnableCaretBrowsing", false);
10 testRunner.dumpAsText();
11
12 target = document.getElementById('target');
13 target.focus();
14
15 eventSender.mouseMoveTo(target.offsetLeft, target.offsetTop);
16 eventSender.mouseDown();
17 eventSender.mouseMoveTo(target.offsetLeft + target.offsetWidth, target.o ffsetTop);
18 eventSender.mouseUp();
19
20 eventSender.mouseMoveTo(target.offsetLeft + (target.offsetWidth / 3), ta rget.offsetTop);
21 eventSender.mouseDown();
22 eventSender.mouseUp();
23 shouldBeEqualToString("getSelection().type", "Caret");
24 }
25 </script>
26 </body>
27 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698