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

Unified Diff: content/test/data/drag_and_drop/drop_target.html

Issue 2453693003: Browser tests for OOPIF support for drag-n-drop. (Closed)
Patch Set: Giving up and going back to using notifications. Created 4 years, 1 month 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: content/test/data/drag_and_drop/drop_target.html
diff --git a/content/test/data/drag_and_drop/drop_target.html b/content/test/data/drag_and_drop/drop_target.html
new file mode 100644
index 0000000000000000000000000000000000000000..4f1bbccecc617af4ca45d0e3e6bb0ef86bc9b213
--- /dev/null
+++ b/content/test/data/drag_and_drop/drop_target.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- Frame that can be used to test drop of a drag-and-drop operation.
+ The drop target (a <div>) fills the frame from (0,0) to (199,199).
+-->
+<head>
+ <meta charset="utf-8">
+ <style>
+ div {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 160px;
+ height: 160px;
+ border: 0px;
+ margin: 0px;
+ padding: 20px;
+ text-align: center;
+ vertical-align: middle;
+ }
+ </style>
+ <script src="event_monitoring.js"></script>
+ <script>
+ function dragover_handler(ev) {
+ window.reportDragAndDropEvent(ev);
+
+ // This communicates that we support drag & drop.
+ // Without this, the "drop" event handler below would not fire.
+ ev.preventDefault();
+ }
+
+ function drop_handler(ev) {
+ window.reportDragAndDropEvent(ev);
+
+ // This communicates that we have handled the drop
+ // (i.e. that there is no other, default action to take).
+ ev.preventDefault();
+ }
+ </script>
+</head>
+<body>
+ <div ondragover="dragover_handler(event);" ondrop="drop_handler(event);">
+ <p>Use this frame as a target of a drag-n-drop</p>
+ </div>
+</body>

Powered by Google App Engine
This is Rietveld 408576698