Index: third_party/WebKit/LayoutTests/media/autoplay-muted.html |
diff --git a/third_party/WebKit/LayoutTests/media/autoplay-muted.html b/third_party/WebKit/LayoutTests/media/autoplay-muted.html |
index e9f92591eb4bd051280718ec428b4f493052fca1..4b3ffb8867055d33264199c7f800779f766853c1 100644 |
--- a/third_party/WebKit/LayoutTests/media/autoplay-muted.html |
+++ b/third_party/WebKit/LayoutTests/media/autoplay-muted.html |
@@ -70,12 +70,17 @@ |
}); |
}, "Test that autoplay on a muted audio without gesture has no effect."); |
- promise_test(function(t) { |
- var e = createMutedVideoElement(); |
- return e.play().then(t.step_func_done(function() { |
- e.muted = false; |
+ async_test(t => { |
+ var e = createMutedVideoElement(); |
+ e.play().then(t.step_func(() => { |
+ e.muted = false; |
+ |
+ var expectedEvents = [ 'volumechange', 'pause' ]; |
+ new EventWatcher(t, e, expectedEvents).wait_for(expectedEvents).then( |
+ t.step_func_done(() => { |
assert_true(e.paused, "The video should be paused."); |
- })); |
+ })); |
+ })); |
}, "Test that unmuting an autoplayed video without gesture pauses."); |
async_test(function(t) { |