| Index: third_party/WebKit/LayoutTests/media/video-black-bg-in-media-document.html
|
| diff --git a/third_party/WebKit/LayoutTests/media/video-black-bg-in-media-document.html b/third_party/WebKit/LayoutTests/media/video-black-bg-in-media-document.html
|
| index aa2e5fb9e770989a8f413465fffd88a0ac58c46b..2ae28aad2c62e9e70e238186a145c747d7b1e028 100644
|
| --- a/third_party/WebKit/LayoutTests/media/video-black-bg-in-media-document.html
|
| +++ b/third_party/WebKit/LayoutTests/media/video-black-bg-in-media-document.html
|
| @@ -1,30 +1,20 @@
|
| -<html>
|
| - <head>
|
| - <script src="media-file.js"></script>
|
| - <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956
|
| - (Please avoid writing new tests using video-test.js) -->
|
| - <script src="video-test.js"></script>
|
| - <script>
|
| - function iframeLoad() {
|
| - var iframe = document.querySelector("iframe");
|
| - var iframeBody = iframe.contentDocument.querySelector("body");
|
| +<!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");
|
|
|
| - // Required to be global for testExpected() to work properly.
|
| - iframeBodyStyle = iframe.contentDocument.defaultView.getComputedStyle(iframeBody, null);
|
| - testExpected("iframeBodyStyle.backgroundColor", "rgb(0, 0, 0)");
|
| - endTest();
|
| - }
|
| + var iframeBodyStyle = iframeDocument.defaultView.getComputedStyle(iframeBody);
|
| + assert_equals(iframeBodyStyle.backgroundColor, "rgb(0, 0, 0)");
|
| + });
|
|
|
| - function load() {
|
| - var iframe = document.querySelector("iframe");
|
| - iframe.onload = iframeLoad;
|
| - iframe.src = findMediaFile("video", "content/counting");
|
| - }
|
| - </script>
|
| - </head>
|
| -
|
| - <body onload="load()">
|
| - <p>Test that video media documents have a black background.</p>
|
| - <iframe style="width: 200px; height: 200px;"></iframe>
|
| - </body>
|
| -</html>
|
| + iframe.src = findMediaFile("video", "content/counting");
|
| +});
|
| +</script>
|
|
|