OLD | NEW |
---|---|
(Empty) | |
1 <!doctype html> | |
2 <script src="../../../resources/testharness.js"></script> | |
3 <script src="../../../resources/testharnessreport.js"></script> | |
4 <div id="outer" style="background: orange; padding: 50px; user-select: none" tab index="-1"> | |
5 <input id="input" value="foo"> | |
6 </div> | |
7 <script> | |
8 promise_test(() => { | |
9 return new Promise((resolve, reject) => { | |
10 if (window.eventSender === undefined) | |
11 return reject('required window.eventSender'); | |
12 if (window.chrome === undefined) | |
13 return reject('required chrome.gpuBenchmarking'); | |
14 if (window.chrome.gpuBenchmarking === undefined) | |
15 return reject('required chrome.gpuBenchmarking'); | |
16 input.focus(); | |
17 assert_equals(document.activeElement, input); | |
18 // Click in outer element outside of input element. | |
19 var pointerActions = | |
20 [{source: 'mouse', | |
21 actions: [ | |
22 { name: 'pointerDown', x: 20, y: 20, button:'left' }, | |
23 { name: 'pointerUp', button:'left' },]}]; | |
24 chrome.gpuBenchmarking.pointerActionSequence(pointerActions, resolve); | |
yosin_UTC9
2017/05/18 10:00:14
I think |input.blur()| is enough.
yoichio
2017/05/19 01:51:23
No, we need focus on |user-select:none, tabindex=-
yosin_UTC9
2017/05/19 02:06:40
How about move to focus to |user-select:none, tabi
yoichio
2017/05/19 05:37:49
Done.
| |
25 }).then(() => { | |
26 console.log("end"); | |
yosin_UTC9
2017/05/18 10:00:14
nit: We don't need to have |console.log()|.
yoichio
2017/05/19 01:51:23
Done.
| |
27 assert_equals(document.activeElement, outer, 'outer is focued.'); | |
28 eventSender.keyDown('a'); | |
29 assert_equals(input.value, 'foo', 'Input value should not change.'); | |
30 }); | |
31 }); | |
32 </script> | |
OLD | NEW |