Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/media/autoplay-muted-datasaver-off.html |
| diff --git a/third_party/WebKit/LayoutTests/media/autoplay-muted-datasaver-off.html b/third_party/WebKit/LayoutTests/media/autoplay-muted-datasaver-off.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..16035bc2a8ea32fd7d0b511c0eec3e8c9c07e244 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/media/autoplay-muted-datasaver-off.html |
| @@ -0,0 +1,26 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| + <title>Test muted autoplay videos interaction with data saver on</title> |
| + <script src="../resources/testharness.js"></script> |
| + <script src="../resources/testharnessreport.js"></script> |
| + <script src="media-file.js"></script> |
| +</head> |
| +<body> |
| +<script> |
| + window.internals.settings.setMediaPlaybackRequiresUserGesture(true); |
| + window.internals.runtimeFlags.videosAsImagesEnabled = true; |
| + window.internals.settings.setDataSaverEnabled(true); |
|
whywhat
2016/06/08 20:47:37
I think the names of the tests are not in sync wit
mlamouri (slow - plz ping)
2016/06/09 13:11:48
Thanks for catching this! :)
|
| + |
| + async_test(function(t) |
|
whywhat
2016/06/08 20:47:37
consider using promise_test()?
should be somethin
mlamouri (slow - plz ping)
2016/06/09 13:11:48
I switched to promise_test.
|
| + { |
| + var video = document.createElement('video'); |
| + video.src = findMediaFile('video', 'content/test'); |
| + video.muted = true; |
| + video.play().then(function() { |
| + assert_notreached("play() should not succeed"); |
| + }, t.step_func_done()); |
| + }); |
| +</script> |
| +</body> |
| +</html> |