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

Unified Diff: LayoutTests/editing/selection/selectstart-event-crash.html

Issue 1288883002: Make SelectionController not to set invalid selection by mouse down (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-13T18:38:20 Remove ASSERTs Created 5 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
« no previous file with comments | « no previous file | Source/core/editing/SelectionController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/selection/selectstart-event-crash.html
diff --git a/LayoutTests/editing/selection/selectstart-event-crash.html b/LayoutTests/editing/selection/selectstart-event-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..452ae5fac94f77ed4aff07e0c171a0a25784c9c7
--- /dev/null
+++ b/LayoutTests/editing/selection/selectstart-event-crash.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<div id="sample"><table id="one"><caption></caption></table></div>
+<div id="log"></div>
+<script>
+var one = document.querySelector('#one');
+document.addEventListener('selectstart', function() {
+ one.remove();
+});
+test(function() {
+ if (!window.eventSender)
+ return;
+ eventSender.mouseMoveTo(one.offsetLeft, one.offsetTop);
+ eventSender.mouseDown();
+ var selection = getSelection();
+ assert_true(selection.rangeCount == 0);
hajimehoshi 2015/08/13 09:45:36 assert_equals
yosin_UTC9 2015/08/13 09:51:35 Done.
+});
+</script>
« no previous file with comments | « no previous file | Source/core/editing/SelectionController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698