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

Side by Side Diff: LayoutTests/editing/caret/caret-type-for-user-select-none.html

Issue 23461040: Selection should not set the cursor type to text over the explicitly set cursor type. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch updated 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
« no previous file with comments | « no previous file | LayoutTests/editing/caret/caret-type-for-user-select-none-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 <p><b>Tests whether explicitly set caret style is retained on performing text se lection</b></p>
yosin_UTC9 2013/09/17 09:46:38 nit: We may want to use description('Tests where..
5 <div style="cursor:progress" id="test">Try selecting the text by dragging the cu rsor.</div>
6 </body>
7 <script src="../../fast/js/resources/js-test-pre.js"></script>
8 <script>
9 if (window.eventSender && window.internals) {
10 var cursorType = 'Progress';
11
12 var div = document.getElementById("test");
13 div.focus();
14
15 var y = div.offsetTop + div.offsetHeight / 2;
16
17 function leapForwardAndMove(x) {
18 eventSender.leapForward(200);
19 eventSender.mouseMoveTo(div.offsetLeft + x, y);
20 }
21
22 eventSender.dragMode = false;
23 eventSender.mouseMoveTo(div.offsetLeft + 5, y);
24 eventSender.mouseDown();
25
26 leapForwardAndMove(10);
27
28 leapForwardAndMove(div.offsetWidth - 10);
29
30 var cursorInfo = window.internals.getCurrentCursorInfo(document);
31 var currentCursorType = cursorInfo.substring(cursorInfo.indexOf('=')+1, curs orInfo.lastIndexOf(' '));
yosin_UTC9 2013/09/17 09:46:38 nit: put spaces around "+".
32 shouldBe('currentCursorType', 'cursorType');
yosin_UTC9 2013/09/17 09:46:38 shouldBeEqualToString('currentCurosrType', cursorT
33 }
34 </script>
35 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/caret/caret-type-for-user-select-none-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698