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

Unified Diff: third_party/WebKit/LayoutTests/fast/dnd/event-mouse-coordinates.html

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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
Index: third_party/WebKit/LayoutTests/fast/dnd/event-mouse-coordinates.html
diff --git a/third_party/WebKit/LayoutTests/fast/dnd/event-mouse-coordinates.html b/third_party/WebKit/LayoutTests/fast/dnd/event-mouse-coordinates.html
new file mode 100644
index 0000000000000000000000000000000000000000..71d7b84a8082425b2ad0173e0d4f75c894f076c8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dnd/event-mouse-coordinates.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<meta charset="utf-8" />
+<!-- This test checks whether we compute pointer coordinates correctly for the
+ dragstart, dragend, and drop events issued during drag-and-drop operations.
+ This is the easy case. The more interesting situations, which involve
+ iframes, are tested in similarly named files. -->
+<link rel="stylesheet" href="resources/event-mouse-coordinates.css" />
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="resources/event-mouse-coordinates.js"></script>
+
+<p>
+ Please drag the "Drag Me" box into the "Drop Here" box.
+</p>
+
+<div class="dragged box" draggable="true">
+ Drag Me
+</div>
+
+<div class="dropzone box">
+ Drop Here
+</div>
+
+<script>
+
+promise_test((t) => {
+ const dragCenter = elementCenter(document.querySelector('.dragged'));
+ const dropCenter = elementCenter(document.querySelector('.dropzone'));
+ return runDragTest(t, {
+ domRoot: document,
+ frameOffset: { x: 0, y: 0 },
+ start: { client: dragCenter, page: { x: 250, y: 150 }},
+ end: { client: dropCenter, page: { x: 450, y: 350 }},
+ });
+}, 'Dragging and dropping a DOM node in the top-level frame');
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698