OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../media/media-file.js"></script> | 4 <script src="../media/media-file.js"></script> |
5 <script src="../../media/video-test.js"></script> | 5 <script src="../media/video-test.js"></script> |
6 <script> | 6 <script> |
7 var metaElement; | 7 var metaElement; |
8 var standaloneMediaDocument; | 8 var standaloneMediaDocument; |
9 var skipOnFirstEmptyLoad = 0; | 9 var skipOnFirstEmptyLoad = 0; |
10 | 10 |
11 function frameLoaded() | 11 function frameLoaded() |
12 { | 12 { |
13 if (++skipOnFirstEmptyLoad == 1) | 13 if (++skipOnFirstEmptyLoad == 1) |
14 return; | 14 return; |
15 | 15 |
16 standaloneMediaDocument = document.getElementById("videoframe").
contentDocument; | 16 standaloneMediaDocument = document.getElementById("videoframe").
contentDocument; |
17 metaElement = standaloneMediaDocument.querySelector("meta"); | 17 metaElement = standaloneMediaDocument.querySelector("meta"); |
18 | 18 |
19 testExpected("metaElement.name", "viewport"); | 19 testExpected("metaElement.name", "viewport"); |
20 testExpected("metaElement.content", "width=device-width"); | 20 testExpected("metaElement.content", "width=device-width"); |
21 | 21 |
22 endTest(); | 22 endTest(); |
23 } | 23 } |
24 </script> | 24 </script> |
25 </head> | 25 </head> |
26 <body> | 26 <body> |
27 <p> | 27 <p> |
28 This tests that a standalone media document has viewport settings. | 28 This tests that a standalone media document has viewport settings. |
29 </p> | 29 </p> |
30 <iframe id="videoframe" onload="frameLoaded()"></iframe> | 30 <iframe id="videoframe" onload="frameLoaded()"></iframe> |
31 <script> | 31 <script> |
32 document.getElementById("videoframe").src = "../../media/" + findMed
iaFile("video", "content/test"); | 32 document.getElementById("videoframe").src = findMediaFile("video", "
content/test"); |
33 </script> | 33 </script> |
34 </body> | 34 </body> |
35 </html> | 35 </html> |
OLD | NEW |