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

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

Issue 2046403002: Autoplay: disable muted video autoplay if data saver is on. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@video-as-images-flag
Patch Set: Created 4 years, 6 months 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 | « no previous file | third_party/WebKit/LayoutTests/media/autoplay-muted-datasaver-on.html » ('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-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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/autoplay-muted-datasaver-on.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698