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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/drag-nested-eventSender-use.html

Issue 1718463002: Gracefully handle nested eventSender.beginDragWithFiles() attempts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/fast/events/drag-nested-eventSender-use.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/drag-nested-eventSender-use.html b/third_party/WebKit/LayoutTests/fast/events/drag-nested-eventSender-use.html
new file mode 100644
index 0000000000000000000000000000000000000000..c3b98c1a9fcde0abee330b29fac4a1af7ccd0a19
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/events/drag-nested-eventSender-use.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../resources/js-test.js"></script>
+<script>
+description("Test that unsupported nested use of eventSender.beginDragWithFiles() is handled without crashing.");
+
+window.jsTestIsAsync = true;
dcheng 2016/02/19 18:16:27 Does the test need to be async?
sof 2016/02/19 18:37:48 Most tests in this directory are keyed off onload,
dcheng 2016/02/19 18:39:21 If the test runs synchronously in onload, making i
sof 2016/02/19 20:03:17 De-async'ified the test; works fine.
+
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+function runTest()
+{
+ eventSender.beginDragWithFiles(["resources/empty.html"]);
+ eventSender.beginDragWithFiles(["resources/empty.html"]);
+ eventSender.mouseMoveTo(10, 10);
+ eventSender.mouseUp();
+}
+window.onload = function () {
+ shouldThrow("runTest()");
+ finishJSTest();
+};
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698