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

Side by Side Diff: LayoutTests/fast/events/mousedown-inside-dragstart-should-not-cause-crash.html

Issue 488923003: Gracefully handle drag cancellation during drag start. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Expand comment somewhat Created 6 years, 4 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/mousedown-inside-dragstart-should-not-cause-crash-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 id="description">
5 This tests pressing a mouse button down inside a dragstart event.<br>
6 This happens when a user sets a breakpoint of a dragstart event handler in Inspe ctor,
7 and clicks somewhere on the page while the script is paused at the breakpoint. W ebKit should not crash.
8 </p>
9 <div id="container"><span id="target" draggable="true" ondragstart="onDragStart( )">drag me</span></div>
10 <script>
11
12 if (!window.testRunner || !window.eventSender)
13 document.body.innerHTML = 'This test requires eventSender';
14 else {
15 testRunner.dumpAsText();
16
17 var target = document.getElementById('target');
18 var called = false;
19
20 function onDragStart() {
21 called = true;
22 eventSender.mouseUp();
23 eventSender.mouseDown();
24 }
25
26 eventSender.mouseMoveTo(target.offsetLeft + target.offsetWidth / 2, target.o ffsetTop + target.offsetHeight / 2);
27 eventSender.mouseDown();
28 eventSender.leapForward(100);
29 eventSender.mouseMoveTo(500, 500);
30 eventSender.mouseUp();
31
32 document.getElementById('container').textContent = called ? 'PASS - mouse up and down inside a dragstart did not crash WebKit'
33 : 'FAIL - dragstart was never fired.';
34 }
35
36 </script>
37 </body>
38 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/mousedown-inside-dragstart-should-not-cause-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698