| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="media-file.js"></script> | 3 <script src="media-file.js"></script> |
| 4 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 5 (Please avoid writing new tests using video-test.js) --> |
| 4 <script src="video-test.js"></script> | 6 <script src="video-test.js"></script> |
| 5 <script> | 7 <script> |
| 6 function iframeLoad() { | 8 function iframeLoad() { |
| 7 var iframe = document.querySelector("iframe"); | 9 var iframe = document.querySelector("iframe"); |
| 8 var iframeBody = iframe.contentDocument.querySelector("body"); | 10 var iframeBody = iframe.contentDocument.querySelector("body"); |
| 9 | 11 |
| 10 // Required to be global for testExpected() to work properly. | 12 // Required to be global for testExpected() to work properly. |
| 11 iframeBodyStyle = iframe.contentDocument.defaultView.getComputed
Style(iframeBody, null); | 13 iframeBodyStyle = iframe.contentDocument.defaultView.getComputed
Style(iframeBody, null); |
| 12 testExpected("iframeBodyStyle.backgroundColor", "rgb(0, 0, 0)"); | 14 testExpected("iframeBodyStyle.backgroundColor", "rgb(0, 0, 0)"); |
| 13 endTest(); | 15 endTest(); |
| 14 } | 16 } |
| 15 | 17 |
| 16 function load() { | 18 function load() { |
| 17 var iframe = document.querySelector("iframe"); | 19 var iframe = document.querySelector("iframe"); |
| 18 iframe.onload = iframeLoad; | 20 iframe.onload = iframeLoad; |
| 19 iframe.src = findMediaFile("video", "content/counting"); | 21 iframe.src = findMediaFile("video", "content/counting"); |
| 20 } | 22 } |
| 21 </script> | 23 </script> |
| 22 </head> | 24 </head> |
| 23 | 25 |
| 24 <body onload="load()"> | 26 <body onload="load()"> |
| 25 <p>Test that video media documents have a black background.</p> | 27 <p>Test that video media documents have a black background.</p> |
| 26 <iframe style="width: 200px; height: 200px;"></iframe> | 28 <iframe style="width: 200px; height: 200px;"></iframe> |
| 27 </body> | 29 </body> |
| 28 </html> | 30 </html> |
| OLD | NEW |