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

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

Issue 2001993002: [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: Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/selection/mouse/drag_user_select_none.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/mouse/drag_user_select_none.html b/third_party/WebKit/LayoutTests/editing/selection/mouse/drag_user_select_none.html
index a4594b08ffb63c7f8005ab2842037c0a3d710aa2..75be3f49e43c9e21a754ea53ce09a7bd2c621d9d 100644
--- a/third_party/WebKit/LayoutTests/editing/selection/mouse/drag_user_select_none.html
+++ b/third_party/WebKit/LayoutTests/editing/selection/mouse/drag_user_select_none.html
@@ -1,24 +1,17 @@
<!doctype HTML>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
-<div><span id="start" style="-webkit-user-select:none;">0123</span><span id="anchor">45</span><span id="end" style="-webkit-user-select:none;">6789</span></div>
+<div><span id="start" style="-webkit-user-select:none;">0123</span><span id="anchor">45</span><span id="end">6789</span></div>
<div id="log"></div>
<script>
test(function() {
- if (!window.eventSender)
- reutrn;
- var start = document.getElementById('start');
+ assert_true(window.eventSender != null, 'Window should have eventSender');
+
x1 = start.offsetParent.offsetLeft + start.offsetLeft + start.offsetWidth / 2;
y1 = start.offsetParent.offsetTop + start.offsetTop + start.offsetHeight / 2;
eventSender.mouseMoveTo(x1, y1);
eventSender.mouseDown();
- eventSender.leapForward(100);
- eventSender.mouseMoveTo(x1 + 5, y1);
- eventSender.leapForward(100);
- eventSender.mouseMoveTo(x1 + 10, y1);
-
- end = document.getElementById('end');
x2 = end.offsetParent.offsetLeft + end.offsetLeft + end.offsetWidth / 2;
y2 = end.offsetParent.offsetTop + end.offsetTop + end.offsetHeight / 2;
@@ -27,9 +20,10 @@ test(function() {
var selection = window.getSelection();
var anchor = document.getElementById('anchor').firstChild;
- assert_equals(selection.anchorNode, anchor, 'anchorNode');
+ assert_equals(selection.type, 'None', 'type');
+ assert_equals(selection.anchorNode, null, 'anchorNode');
assert_equals(selection.anchorOffset, 0, 'anchorOffset');
- assert_equals(selection.focusNode, anchor, 'focusNode');
- assert_equals(selection.focusOffset, 2, 'focusOffset');
+ assert_equals(selection.focusNode, null, 'focusNode');
+ assert_equals(selection.focusOffset, 0, 'focusOffset');
});
</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698