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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/mouse-up-preventDefault-dragstate.html

Issue 2042333006: Reset drag state variables on mouse up (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Applying the comments Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/EventHandler.h » ('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 <script src="../../resources/testharness.js"></script>
2 <script src="../../resources/testharnessreport.js"></script>
3
4 <style>
5 #target {
6 width: 200px;
7 height: 200px;
8 }
9 </style>
10
11 <p>This is the top level window.</p>
12 <p>Click somewhere. Move the mouse into the iframe.</p>
13 <p>Mouse move should be received by the iframe.</p>
14 <iframe id="target" srcdoc="
15 <p>This is the iframe.</p>
16 <script>
17 document.addEventListener('mousemove', function() {
18 parent.mouseMoveReceived();
19 });
20 </script>
21 "></iframe>
22
23 <script>
24 var test_mousemove = async_test("Inner frame should receive mousemove even when mouseup preventDefault was called in the parent frame.");
25 var mouseUpPrevented = 0;
26 function mouseMoveReceived() {
27 if (mouseUpPrevented == 1)
28 test_mousemove.done();
29 }
30 document.addEventListener("mouseup", function(e) {
31 e.preventDefault();
32 mouseUpPrevented = 1;
33 });
34
35 function runTest() {
36 if (window.eventSender) {
37 var targetRect = document.getElementById("target").getBoundingClientRect();
38 eventSender.mouseMoveTo(targetRect.right+10, targetRect.bottom+10);
39 eventSender.mouseDown(0);
40 eventSender.mouseUp(0);
41 eventSender.mouseMoveTo(targetRect.right-10, targetRect.bottom-10);
42 }
43 }
44 window.onload = function() {
45 runTest();
46 }
47 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/EventHandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698