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

Side by Side Diff: third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/pointer-event-properties-in-iframe.html

Issue 1964523002: Fix clientX/Y properties of touch pointer events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <script src='../../../../../resources/js-test.js'></script>
3 <style>
4 iframe {
5 width: 300px;
6 height: 300px;
7 margin-left: 100px;
8 margin-top: 30px;
9 border: 0;
10 background: green;
11 }
12 </style>
13 <iframe id='target' srcdoc="
mustaq 2016/05/09 18:08:34 Please indent the quoted srcdoc.
Navid Zolghadr 2016/05/09 18:59:04 Done.
14 <body style='height:500px; padding: 0; margin: 0;'>
15
16 <script>
17 var testEventList = ['pointerup', 'pointerdown', 'pointermove',
18 'mouseup', 'mousedown', 'mousemove',];
19
20 testEventList.forEach(function(eventName) {
21 document.documentElement.addEventListener(eventName, function(event) {
22 top.document.events.push(event);
23 });
24 });
25
26 </script></body>"></iframe>
27
28 <div id='console'></div>
29
30 <script>
31
32 var attributes = [
33 'clientX',
34 'clientY'
35 ];
36
37 document.events = [];
38
39 function runTests() {
40 document.getElementById('target').contentWindow.scrollTo(0, 100);
41 testRunner.dumpAsText();
42 testRunner.waitUntilDone();
43
44 // touch events inside iframe
45 eventSender.addTouchPoint(200, 200)
46 eventSender.touchStart();
47 eventSender.updateTouchPoint(0, 200, 200);
48 eventSender.touchMove();
49 eventSender.releaseTouchPoint(0);
50 eventSender.touchEnd();
51
52 window.setTimeout('finish()', 0);
53 }
54
55 function finish()
56 {
57 document.events.forEach(function(event) {
58 debug(event.type + " of " + event.pointerType + " is recieved:");
59 attributes.forEach(function(att) {
60 debug(att + " = " + event[att]);
61 });
62 });
63 testRunner.notifyDone();
64 }
65
66 if (window.eventSender) {
67 window.onload = runTests;
68 } else
69 debug('This test requires eventSender');
70
71 description("This test verifies clientX/Y of pointer events inside iframe.");
72
73 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698