| <!DOCTYPE html> |
| <title>Test that video media documents have a black background.</title> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <script src="media-file.js"></script> |
| <iframe></iframe> |
| <script> |
| async_test(function(t) { |
| var iframe = document.querySelector("iframe"); |
| iframe.onload = t.step_func_done(function() { |
| var iframeDocument = iframe.contentDocument; |
| var iframeBody = iframeDocument.querySelector("body"); |
| |
| var iframeBodyStyle = iframeDocument.defaultView.getComputedStyle(iframeBody); |
| assert_equals(iframeBodyStyle.backgroundColor, "rgb(0, 0, 0)"); |
| }); |
| |
| iframe.src = findMediaFile("video", "content/counting"); |
| }); |
| </script> |