Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/editing/selection/mouse/select_user_select_in_shadow.html |
| diff --git a/third_party/WebKit/LayoutTests/editing/selection/mouse/select_user_select_in_shadow.html b/third_party/WebKit/LayoutTests/editing/selection/mouse/select_user_select_in_shadow.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f130c9fd14091d13aa59c29ec3acdd76ecfd966c |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/editing/selection/mouse/select_user_select_in_shadow.html |
| @@ -0,0 +1,27 @@ |
| +<!doctype HTML> |
| +<script src="../../../resources/testharness.js"></script> |
| +<script src="../../../resources/testharnessreport.js"></script> |
| +<div id="div" style="-webkit-user-select: none"></div> |
| +<div id="log"></div> |
| +<script> |
| +test(function() { |
| + if (!window.eventSender) |
|
yosin_UTC9
2016/08/16 06:34:42
Use assert_not_equals(window.eventSender, undefine
yoichio
2016/08/16 08:25:46
Done.
|
| + assert_unreached("This test requires window.eventSender to exist2"); |
| + |
| + var host = div.createShadowRoot(); |
|
yosin_UTC9
2016/08/16 06:34:42
Let's use |attachShadow({mode: 'open'})|, this is
yoichio
2016/08/16 08:25:46
Done.
|
| + var child = document.createElement('div'); |
| + child.style.webkitUserSelect = 'text'; |
| + child.textContent = 'shouldBeSelectable'; |
| + host.appendChild(child); |
|
yosin_UTC9
2016/08/16 06:34:42
We also want to have a test case for distributed n
yoichio
2016/08/16 08:25:46
Done.
|
| + |
| + eventSender.mouseMoveTo(child.offsetLeft + child.offsetWidth / 2, child.offsetTop + child.offsetHeight / 2); |
| + eventSender.mouseDown(); |
| + eventSender.mouseUp(); |
| + eventSender.leapForward(1); |
| + eventSender.mouseDown(); |
| + eventSender.mouseUp(); |
| + eventSender.leapForward(1); |
| + |
| + assert_equals(window.getSelection().toString(), 'shouldBeSelectable', 'selection.toString'); |
| +}); |
| +</script> |