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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/EventHandler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/events/mouse-up-preventDefault-dragstate.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/mouse-up-preventDefault-dragstate.html b/third_party/WebKit/LayoutTests/fast/events/mouse-up-preventDefault-dragstate.html
new file mode 100644
index 0000000000000000000000000000000000000000..4bb6d90d1710cee4e415d772f8a1d10bc18632f5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/events/mouse-up-preventDefault-dragstate.html
@@ -0,0 +1,47 @@
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+
+<style>
+#target {
+ width: 200px;
+ height: 200px;
+}
+</style>
+
+<p>This is the top level window.</p>
+<p>Click somewhere. Move the mouse into the iframe.</p>
+<p>Mouse move should be received by the iframe.</p>
+<iframe id="target" srcdoc="
+<p>This is the iframe.</p>
+<script>
+ document.addEventListener('mousemove', function() {
+ parent.mouseMoveReceived();
+ });
+</script>
+"></iframe>
+
+<script>
+var test_mousemove = async_test("Inner frame should receive mousemove even when mouseup preventDefault was called in the parent frame.");
+var mouseUpPrevented = 0;
+function mouseMoveReceived() {
+ if (mouseUpPrevented == 1)
+ test_mousemove.done();
+}
+document.addEventListener("mouseup", function(e) {
+ e.preventDefault();
+ mouseUpPrevented = 1;
+});
+
+function runTest() {
+ if (window.eventSender) {
+ var targetRect = document.getElementById("target").getBoundingClientRect();
+ eventSender.mouseMoveTo(targetRect.right+10, targetRect.bottom+10);
+ eventSender.mouseDown(0);
+ eventSender.mouseUp(0);
+ eventSender.mouseMoveTo(targetRect.right-10, targetRect.bottom-10);
+ }
+}
+window.onload = function() {
+ runTest();
+}
+</script>
« 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