| Index: third_party/WebKit/LayoutTests/media/video-controls-muted-video-can-unmute.html
|
| diff --git a/third_party/WebKit/LayoutTests/media/video-controls-muted-video-can-unmute.html b/third_party/WebKit/LayoutTests/media/video-controls-muted-video-can-unmute.html
|
| index fdf9035a129dfb6599365659b64e11a0c9925462..c12fe6e3d16f1a36e094126313069934d4d3138d 100644
|
| --- a/third_party/WebKit/LayoutTests/media/video-controls-muted-video-can-unmute.html
|
| +++ b/third_party/WebKit/LayoutTests/media/video-controls-muted-video-can-unmute.html
|
| @@ -1,19 +1,22 @@
|
| +<!DOCTYPE html>
|
| +<title>Test that muted video has an unmute button.</title>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script src="media-file.js"></script>
|
| +<script src="media-controls.js"></script>
|
| <video controls></video>
|
| -<p>Test that muted video has an unmute button.<p>
|
| -<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 src=media-controls.js></script>
|
| <script>
|
| - run("video.muted = true");
|
| - video.src = findMediaFile("video", "content/test");
|
| - run("video.load()");
|
| - waitForEvent("canplaythrough", function () {
|
| - testExpected("video.muted", true);
|
| - muteButton = mediaControlsButton(video, "mute-button");
|
| +async_test(function(t) {
|
| + var video = document.querySelector("video");
|
| + video.muted = true;
|
| +
|
| + video.oncanplaythrough = t.step_func_done(function() {
|
| + assert_true(video.muted);
|
| + var muteButton = mediaControlsButton(video, "mute-button");
|
| // Make sure that the mute button is visible.
|
| - testExpected("getComputedStyle(muteButton).display", "none", '!=');
|
| - endTest();
|
| + assert_not_equals(getComputedStyle(muteButton).display, "none");
|
| });
|
| -</script>
|
| +
|
| + video.src = findMediaFile("video", "content/test");
|
| +});
|
| +</script>
|
|
|