Index: third_party/WebKit/LayoutTests/media/video-muted.html |
diff --git a/third_party/WebKit/LayoutTests/media/video-muted.html b/third_party/WebKit/LayoutTests/media/video-muted.html |
index f7a8f0996562b0f779db24d48455d649da747c22..07d424735dc505615bb23a8eb38de1fd4d5fa0e0 100644 |
--- a/third_party/WebKit/LayoutTests/media/video-muted.html |
+++ b/third_party/WebKit/LayoutTests/media/video-muted.html |
@@ -1,19 +1,22 @@ |
-<video controls></video> |
-<p>Test 'muted' attribute<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> |
+<!DOCTYPE html> |
+<title>Test "muted" attribute.</title> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<script src="media-file.js"></script> |
+<video></video> |
<script> |
- testExpected("video.muted", false); |
- run("video.muted = true"); |
- testExpected("video.muted", true); |
- video.src = findMediaFile("video", "content/test"); |
- run("video.load()"); |
- waitForEvent("canplaythrough", function () { |
- testExpected("video.muted", true); |
- run("video.muted = false"); |
- testExpected("video.muted", false); |
- endTest(); |
+async_test(function(t) { |
+ var video = document.querySelector("video"); |
+ assert_false(video.muted); |
+ video.muted = true; |
+ assert_true(video.muted); |
+ |
+ video.oncanplaythrough = t.step_func_done(function () { |
+ assert_true(video.muted); |
+ video.muted = false; |
+ assert_false(video.muted); |
}); |
-</script> |
+ |
+ video.src = findMediaFile("video", "content/test"); |
+}); |
+</script> |