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

Unified Diff: LayoutTests/fast/media/viewport-in-standalone-media-document.html

Issue 18034007: Add viewport settings for ImageDocument and MediaDocument (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: LayoutTests Created 7 years, 5 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/media/viewport-in-standalone-media-document.html
diff --git a/LayoutTests/fast/media/viewport-in-standalone-media-document.html b/LayoutTests/fast/media/viewport-in-standalone-media-document.html
new file mode 100644
index 0000000000000000000000000000000000000000..a777146eb98eadced132ffdc6a9ff86dba0905ef
--- /dev/null
+++ b/LayoutTests/fast/media/viewport-in-standalone-media-document.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="../../media/media-file.js"></script>
+ <script src="../../media/video-test.js"></script>
+ <script>
+ var metaElement;
+ var standaloneMediaDocument;
+ var skipOnFirstEmptyLoad = 0;
+
+ function frameLoaded()
+ {
+ if (++skipOnFirstEmptyLoad == 1)
+ return;
+
+ standaloneMediaDocument = document.getElementById("videoframe").contentDocument;
+ metaElement = standaloneMediaDocument.querySelector("meta");
+
+ testExpected("metaElement.name", "viewport");
+ testExpected("metaElement.content", "width=device-width");
+
+ endTest();
+ }
+ </script>
+ </head>
+ <body>
+ <p>
+ This tests that a standalone media document has viewport settings.
+ </p>
+ <iframe id="videoframe" onload="frameLoaded()"></iframe>
+ <script>
+ document.getElementById("videoframe").src = "../../media/" + findMediaFile("video", "content/test");
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698