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..0bf00a53e6f69005f564b9f143f8cd0dc0476f63 |
--- /dev/null |
+++ b/LayoutTests/media/video-scales-in-media-document.html |
@@ -0,0 +1,31 @@ |
+<html> |
+ <head> |
+ <script src="media-file.js"></script> |
+ <script src="video-test.js"></script> |
+ <script> |
+ function timeupdate(event) { |
+ var video = event.target; |
+ testExpected(video.offsetWidth, 200); |
+ testExpected(video.offsetHeight, 163); |
+ endTest(); |
+ } |
+ |
+ function iframeLoad() { |
+ var iframe = document.getElementById("container"); |
scherkus (not reviewing)
2011/12/06 02:19:53
instead of using IDs just use querySelector('ifram
DaleCurtis
2011/12/06 21:13:45
Interesting, I haven't used that before. By the nu
scherkus (not reviewing)
2011/12/08 06:43:51
ids are unique in a document and as you might imag
|
+ var video = iframe.contentDocument.querySelector("video"); |
+ video.addEventListener("timeupdate", timeupdate); |
scherkus (not reviewing)
2011/12/06 02:19:53
use canplay instead of timeupdate
DaleCurtis
2011/12/06 21:13:45
Done.
|
+ } |
+ |
+ function load() { |
+ var iframe = document.getElementById("container"); |
+ 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; border: 0px; overflow: scroll;" id="container"></iframe> |
+ </body> |
+</html> |