Chromium Code Reviews| 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> |