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

Unified Diff: third_party/WebKit/LayoutTests/fast/dnd/cancel-dragging-outside-page.html

Issue 2900123002: Account for mouse leave events in dragging flow (Closed)
Patch Set: Add the test Created 3 years, 7 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/MouseEventManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dnd/cancel-dragging-outside-page.html
diff --git a/third_party/WebKit/LayoutTests/fast/dnd/cancel-dragging-outside-page.html b/third_party/WebKit/LayoutTests/fast/dnd/cancel-dragging-outside-page.html
new file mode 100644
index 0000000000000000000000000000000000000000..dcc667a311533c3076a8a6138b913ae326d967f1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dnd/cancel-dragging-outside-page.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="resources/link-dragging-common.css" />
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+
+<p>
+ Please attempt to drag the "Drag Me" text out of the browser and release the drag.
+</p>
+
+<article>
+ <a class="dragged box" id="target" draggable="true" href="https://www.chromium.org">
+ Drag Me
+ </a>
+</article>
+
+<script>
+if (window.eventSender) {
+ test( () => {
+ const draggable_link = document.querySelector("#target");
+
+ const clientRect = draggable_link.getBoundingClientRect();
+ const centerX = (clientRect.left + clientRect.right) / 2;
+ const centerY = (clientRect.top + clientRect.bottom) / 2;
+ eventSender.mouseMoveTo(centerX, centerY);
+ eventSender.mouseDown();
+ eventSender.mouseMoveTo(centerX+200, centerY+200);
dtapuska 2017/05/23 20:50:21 Is this guaranteed to be outside of the page? Shou
+ eventSender.mouseLeave();
+ }, "The renderer should not crash");
+}
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/MouseEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698