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

Side by Side Diff: LayoutTests/fast/events/drag-on-mouse-move-cancelled.html

Issue 1013303003: Preventing the default action on 'mousemove' listener shouldn't prevent selection (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modifying comment as per review comments Created 5 years, 8 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/fast/events/drag-on-mouse-move-cancelled-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 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <p id="text">
8 TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT
9 </p>
10 <script>
11 description('Test for <a href="https://code.google.com/p/chromium/issues/det ail?id=346473">bug' +
12 '346473</a>: Text selection should happen even if mousemove eve nt is cancelled,' +
13 'since there is no default action specified for mousemove event in the spec which ' +
14 'is to be prevented on defaultPrevent. To test manually try to select the text in ' +
15 'the paragraph, selection should happen.');
16
17 var testElem = document.getElementById("text");
18 testElem.addEventListener("mousemove", function(event) {
19 event.preventDefault();
20 }, false);
21
22 var text_x = testElem.offsetLeft;
23 var text_y = testElem.offsetTop;
24
25 eventSender.mouseMoveTo(text_x, text_y);
26 eventSender.mouseDown();
27
28 // Create the selection
29 eventSender.mouseMoveTo(text_x + 10, text_y);
30 eventSender.mouseUp();
31
32 shouldBe('window.getSelection().getRangeAt(0).toString().length','1');
33 </script>
34 </body>
35 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/drag-on-mouse-move-cancelled-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698