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

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/mouse/select_user_select_in_shadow.html

Issue 2021793002: [Editing][CSS] Drag from a -webkit-user-select:none element should not start selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698