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

Side by Side 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, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Test for autoplay of video once the media stream is set to null</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="media-file.js"></script>
6 <script>
7 test(function() {
8 assert_true(!!window.internals && !!window.internals.settings,
9 "This test only works when run as a layout test!");
10 }, "Prerequisites to running the rest of the tests");
11 window.internals.settings.setMediaPlaybackRequiresUserGesture(true);
12 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.
13 var v = document.createElement('video');
14 v.srcObject = (new AudioContext()).createMediaStreamDestination().stream ;
15 setTimeout(t.step_func(function() {
16 v.srcObject = null;
17 v.src = findMediaFile('video', 'content/test');
18 v.play()
19 .then(t.unreached_func('The video must not play without user gestu re.'))
20 .catch(t.step_func_done(function() {
21 assert_true(v.paused);
22 }));
23 }),0);
24 }, 'Test that switching from MediaStream to src= does not autoplay.');
25 </script>
OLDNEW
« 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