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

Unified Diff: LayoutTests/fast/events/drag-extra-mouse-down-no-crash.html

Issue 839253002: Gracefully handle mismatched drag ended notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: test tidying Created 5 years, 11 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 | LayoutTests/fast/events/drag-extra-mouse-down-no-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/drag-extra-mouse-down-no-crash.html
diff --git a/LayoutTests/fast/events/drag-extra-mouse-down-no-crash.html b/LayoutTests/fast/events/drag-extra-mouse-down-no-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..7460d7e9d7c353b3bd2199cd1d590c80ea461871
--- /dev/null
+++ b/LayoutTests/fast/events/drag-extra-mouse-down-no-crash.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<p>
+Ill-formed uses of eventSender.mouseDown() while drag is under way should not crash.
+</p>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+function runTest() {
+ if (!window.eventSender)
+ return;
+
+ eventSender.beginDragWithFiles([""]);
+ var x = document.getElementById("link").offsetLeft;
+ var y = document.getElementById("link").offsetTop;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ eventSender.mouseMoveTo(x, y + 1);
+ eventSender.mouseUp();
+ testRunner.notifyDone();
+}
+
+window.onload = runTest;
+</script>
+<a href="data:text/html," id="link">PASS(no crash)</a>
« no previous file with comments | « no previous file | LayoutTests/fast/events/drag-extra-mouse-down-no-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698