Index: third_party/WebKit/LayoutTests/editing/selection/mouse/click-user-select-none-loose-input-focus.html |
diff --git a/third_party/WebKit/LayoutTests/editing/selection/mouse/click-user-select-none-loose-input-focus.html b/third_party/WebKit/LayoutTests/editing/selection/mouse/click-user-select-none-loose-input-focus.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0d539bb09f3f3499a84d0fb6e7cb3006fa13d15a |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/editing/selection/mouse/click-user-select-none-loose-input-focus.html |
@@ -0,0 +1,32 @@ |
+<!doctype html> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<div id="outer" style="background: orange; padding: 50px; user-select: none" tabindex="-1"> |
+ <input id="input" value="foo"> |
+</div> |
+<script> |
+promise_test(() => { |
+ return new Promise((resolve, reject) => { |
+ if (window.eventSender === undefined) |
+ return reject('required window.eventSender'); |
+ if (window.chrome === undefined) |
+ return reject('required chrome.gpuBenchmarking'); |
+ if (window.chrome.gpuBenchmarking === undefined) |
+ return reject('required chrome.gpuBenchmarking'); |
+ input.focus(); |
+ assert_equals(document.activeElement, input); |
+ // Click in outer element outside of input element. |
+ var pointerActions = |
+ [{source: 'mouse', |
+ actions: [ |
+ { name: 'pointerDown', x: 20, y: 20, button:'left' }, |
+ { name: 'pointerUp', button:'left' },]}]; |
+ 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.
|
+ }).then(() => { |
+ 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.
|
+ assert_equals(document.activeElement, outer, 'outer is focued.'); |
+ eventSender.keyDown('a'); |
+ assert_equals(input.value, 'foo', 'Input value should not change.'); |
+ }); |
+}); |
+</script> |