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

Unified Diff: LayoutTests/media/video-scales-in-media-document.html

Issue 8728018: Resize MediaDocument playback to fit window size. (Closed) Base URL: http://git.chromium.org/external/WebKit_trimmed.git@master
Patch Set: Code review fixes. Created 9 years 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
« no previous file with comments | « no previous file | LayoutTests/media/video-scales-in-media-document-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/video-scales-in-media-document.html
diff --git a/LayoutTests/media/video-scales-in-media-document.html b/LayoutTests/media/video-scales-in-media-document.html
new file mode 100644
index 0000000000000000000000000000000000000000..259ba24159f560abc4514bbbc722bf37240c17f8
--- /dev/null
+++ b/LayoutTests/media/video-scales-in-media-document.html
@@ -0,0 +1,32 @@
+<html>
+ <head>
+ <script src="media-file.js"></script>
+ <script src="video-test.js"></script>
+ <script>
+ function canPlayThrough(event) {
+ var video = event.target;
+ testExpected(video.offsetWidth, 200);
+ testExpected(video.offsetHeight, 163);
+ endTest();
+ }
+
+ function iframeLoad() {
+ var iframe = document.querySelector("iframe");
+ var video = iframe.contentDocument.querySelector("video");
+ video.addEventListener("canplaythrough", canPlayThrough);
+ video.load()
+ }
+
+ function load() {
+ var iframe = document.querySelector("iframe");
+ iframe.onload = iframeLoad;
+ iframe.src = findMediaFile("video", "content/counting");
+ }
+ </script>
+ </head>
+
+ <body onload="load()">
+ <p>Test that video media documents scale to fit undersized containers.</p>
+ <iframe style="width: 200px; height: 200px;"></iframe>
+ </body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/media/video-scales-in-media-document-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698