Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="media-file.js"></script> | |
| 4 <script src="video-test.js"></script> | |
| 5 <script> | |
| 6 function timeupdate(event) { | |
| 7 var video = event.target; | |
| 8 testExpected(video.offsetWidth, 200); | |
| 9 testExpected(video.offsetHeight, 163); | |
| 10 endTest(); | |
| 11 } | |
| 12 | |
| 13 function iframeLoad() { | |
| 14 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
| |
| 15 var video = iframe.contentDocument.querySelector("video"); | |
| 16 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.
| |
| 17 } | |
| 18 | |
| 19 function load() { | |
| 20 var iframe = document.getElementById("container"); | |
| 21 iframe.onload = iframeLoad; | |
| 22 iframe.src = findMediaFile("video", "content/counting"); | |
| 23 } | |
| 24 </script> | |
| 25 </head> | |
| 26 | |
| 27 <body onload="load()"> | |
| 28 <p>Test that video media documents scale to fit undersized containers.</ p> | |
| 29 <iframe style="width: 200px; height: 200px; border: 0px; overflow: scrol l;" id="container"></iframe> | |
| 30 </body> | |
| 31 </html> | |
| OLD | NEW |