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

Unified Diff: third_party/WebKit/LayoutTests/media/autoplay-from-mediastream-to-src.html

Issue 2075563003: [Android, Media] Don't unlock MediaStream elements; instead allow MS to autoplay without a gesture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed the test to not use getUserMedia 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/Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/autoplay-from-mediastream-to-src.html
diff --git a/third_party/WebKit/LayoutTests/media/autoplay-from-mediastream-to-src.html b/third_party/WebKit/LayoutTests/media/autoplay-from-mediastream-to-src.html
new file mode 100644
index 0000000000000000000000000000000000000000..8f6a88f5d79fb47e36389e8beb875f104db82ed9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/autoplay-from-mediastream-to-src.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<title>Test for autoplay of video once the media stream is set to null</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="media-file.js"></script>
+<script>
+ test(function() {
+ assert_true(!!window.internals && !!window.internals.settings,
+ "This test only works when run as a layout test!");
+ }, "Prerequisites to running the rest of the tests");
+ window.internals.settings.setMediaPlaybackRequiresUserGesture(true);
+ async_test(function(t) {
mlamouri (slow - plz ping) 2016/06/27 12:28:09 Can you add some empty lines. Like separate the `t
whywhat 2016/06/27 14:50:16 Done.
+ var v = document.createElement('video');
+ v.srcObject = (new AudioContext()).createMediaStreamDestination().stream;
+ setTimeout(t.step_func(function() {
+ v.srcObject = null;
+ v.src = findMediaFile('video', 'content/test');
+ v.play()
+ .then(t.unreached_func('The video must not play without user gesture.'))
+ .catch(t.step_func_done(function() {
+ assert_true(v.paused);
+ }));
+ }),0);
+ }, 'Test that switching from MediaStream to src= does not autoplay.');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698