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

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: Ignore mismatched dragSourceEndedAt() invocations. 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
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..5808f0d0b39810168f36e270f6e51dfbf7793e27
--- /dev/null
+++ b/LayoutTests/fast/events/drag-extra-mouse-down-no-crash.html
@@ -0,0 +1,26 @@
+<p>
jochen (gone - plz use gerrit) 2015/01/12 12:20:25 <!DOCTYPE html>
sof 2015/01/12 22:27:56 Done.
+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') | Source/core/page/EventHandler.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698