OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src="../../resources/testharness.js"></script> | |
3 <script src="../../resources/testharnessreport.js"></script> | |
4 <iframe id=iframe srcdoc=" | |
5 <style> | |
6 .c:hover { display: block; } | |
7 .c { content: attr(class); width: 400px; height: 400px; } | |
8 </style> | |
9 <body id=body> | |
10 <select id=target autofocus=autofocus size=2 class=c></select> | |
11 </body>"></iframe> | |
12 <script> | |
13 var testObj; | |
14 | |
15 function finishTest() { | |
16 testObj.done(); | |
17 } | |
18 | |
19 function moveGesture() { | |
20 pointerActions = | |
21 [{source: "mouse", | |
22 actions: [{ name: "pointerMove", x: 200, y: 51 }, | |
23 { name: "pointerUp", x: 200, y: 51 }] | |
24 }]; | |
25 chrome.gpuBenchmarking.pointerActionSequence(pointerActions, finishTest); | |
26 } | |
27 | |
28 function reloadIframe() { | |
29 iframe.contentWindow.location.reload(); | |
30 setTimeout(moveGesture, 50); | |
lanwei
2017/04/28 16:17:29
Unfortunately, pointerActionSequence API expects t
dtapuska
2017/04/28 18:17:02
It might be possible for this case to actually use
| |
31 } | |
32 | |
33 function go(test) { | |
34 testObj = test; | |
35 if (chrome.gpuBenchmarking) { | |
36 var pointerActions = | |
37 [{source: "mouse", | |
38 actions: [{name: "pointerMove", x: 200, y: 50 }, | |
39 { name: "pointerDown", x: 200, y: 50 }] | |
40 }]; | |
41 chrome.gpuBenchmarking.pointerActionSequence(pointerActions, reloadIframe); | |
42 } else { | |
43 test.done(); | |
44 } | |
45 } | |
46 async_test(go); | |
47 </script> | |
OLD | NEW |