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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dnd/event-mouse-coordinates-nested-iframes.html

Issue 2471843005: Delegate dragend to the correct frame's EventHandler. (Closed)
Patch Set: Addressed some of the feedback. 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset="utf-8" />
3 <!-- This test checks whether we compute pointer coordinates correctly for the
4 dragstart, dragend, and drop events issued during drag-and-drop operations.
5 This test uses nested iframes, because they are a tricky case when
6 computing the clientX, clientY values from screen coordinates. Furthermore,
7 running this test through LSAN ensures that we reset the drag state
8 correctly in all the frames. -->
9 <link rel="stylesheet" href="resources/event-mouse-coordinates-nested-iframe.css " />
10 <script src="../../resources/testharness.js"></script>
11 <script src="../../resources/testharnessreport.js"></script>
12 <script src="resources/event-mouse-coordinates.js"></script>
13 <style>
14 </style>
15
16 <p>
17 Please drag the "Drag Me" box into the "Drop Here" box.
18 </p>
19
20 <iframe id="iframe1" data-source="iframe1-srcdoc"></iframe>
21
22 <script id="iframe1-srcdoc" language="text/html">
23 <!DOCTYPE html>
24 <meta charset="utf-8" />
25 <link rel="stylesheet" href="resources/event-mouse-coordinates-nested-iframe.css " />
26 <iframe id="iframe2" data-source="iframe2-srcdoc">
27 </script>
28
29 <script id="iframe2-srcdoc" language="text/html">
30 <!DOCTYPE html>
31 <meta charset="utf-8" />
32 <link rel="stylesheet" href="resources/event-mouse-coordinates-nested-iframe.css " />
33 <iframe id="iframe3" data-source="iframe3-srcdoc">
34 </script>
35
36 <script id="iframe3-srcdoc" language="text/html">
37 <!DOCTYPE html>
38 <meta charset="utf-8" />
39 <link rel="stylesheet" href="resources/event-mouse-coordinates.css" />
40 <aside class="dragged box" draggable="true">
41 Drag Me
42 </aside>
43
44 <aside class="dropzone box">
45 Drop Here
46 </aside>
47 </script>
48
49 <script>
50
51 promise_test((t) => {
52 return loadNestedFrames(document).then((frameDocument) => {
53 const dragCenter = elementCenter(frameDocument.querySelector('.dragged'));
54 const dropCenter = elementCenter(frameDocument.querySelector('.dropzone'));
55 return runDragTest(t, {
56 domRoot: frameDocument,
57 frameOffset: { x: 90, y: 150 },
58 start: { client: dragCenter, page: { x: 250, y: 150 }},
59 end: { client: dropCenter, page: { x: 450, y: 350 }},
60 });
61 });
62 }, 'Dragging and dropping DOM nodes in an iframe');
63
64 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698