Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: third_party/WebKit/LayoutTests/media/autoplay-muted.html

Issue 2471373005: Pretend the video has no audio track if it is playing as part of autoplay muted. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/blink/webmediaplayer_impl_unittest.cc ('k') | third_party/WebKit/Source/core/html/HTMLMediaElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « media/blink/webmediaplayer_impl_unittest.cc ('k') | third_party/WebKit/Source/core/html/HTMLMediaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698