| 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 bd83ef15f90ecaae5e2f62d522701319693ebc67..e0b5926b5d75ddd2587fc0b5ba9caa570f8af721 100644
|
| --- a/third_party/WebKit/LayoutTests/media/autoplay-muted.html
|
| +++ b/third_party/WebKit/LayoutTests/media/autoplay-muted.html
|
| @@ -15,6 +15,7 @@
|
|
|
| window.internals.settings.setMediaPlaybackRequiresUserGesture(true);
|
| window.internals.runtimeFlags.autoplayMutedVideosEnabled = true;
|
| + testRunner.setAutoplayAllowed(true);
|
|
|
| function createMutedVideoElement() {
|
| var e = document.createElement('video');
|
| @@ -60,4 +61,14 @@
|
| assert_false(e.paused, "The video should not be paused.");
|
| });
|
| }, "Test that unmuting autoplayed video with gesture doesn't pause it.");
|
| +
|
| + promise_test(function(t) {
|
| + testRunner.setAutoplayAllowed(false);
|
| + return promise_rejects(
|
| + t,
|
| + new DOMException(
|
| + 'play() can only be initiated by a user gesture.',
|
| + 'NotAllowedError'),
|
| + createMutedVideoElement().play());
|
| + }, "Test that muted videos don't autoplay when the setting is disabled");
|
| </script>
|
|
|