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

Unified Diff: content/test/data/drag_and_drop/page.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/page.html
diff --git a/content/test/data/drag_and_drop/page.html b/content/test/data/drag_and_drop/page.html
new file mode 100644
index 0000000000000000000000000000000000000000..fe5311913cf1dc2ab1524f88332e48322f33c13b
--- /dev/null
+++ b/content/test/data/drag_and_drop/page.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!-- Page to help with testing of drag-and-drop scenarios.
+
+ Left frame is at (100,100) to (299,299) coordinates.
+ Right frame is at (300,100) to (499,299) coordinates.
+
+ Left frame will load whatever is specified in "left"
+ query parameter (similarily for right frame and "right").
+ Example:
+ .../mouse-tests/page.html?left=image_source.html&right=drop_target.html
+-->
+<head>
+ <meta charset="utf-8">
+ <style>
+ iframe {
+ position: absolute;
+ top: 100px;
+ width: 200px;
+ height: 200px;
+ border: 0px;
+ margin: 0px;
+ padding: 0px;
+ }
+ #left { left: 100px; background: green; }
+ #right { left: 300px; background: cyan; }
+ </style>
+</head>
+<body>
+ <iframe id="left" name="left" srcdoc="blank left frame"></iframe>
+ <iframe id="right" name="right" srcdoc="blank right frame"></iframe>
+ <script>
+ function navigateFrame(id) {
+ var query = new URLSearchParams(window.location.search);
+ if (!query.has(id)) return;
+
+ var url = query.get(id);
+ if (!url) return;
+
+ console.log("Navigating " + id + " to " + url);
+ var frame = document.getElementById(id);
+ frame.contentWindow.location.href = url;
+ }
+ navigateFrame("left");
+ navigateFrame("right");
+ </script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698