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

Side by Side Diff: LayoutTests/media/no-autoplay-with-user-gesture-requirement.html

Issue 428263004: Revert of Delete mediaPlaybackRequiresUserGesture (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <title>Test that media autoplay should not work if user gesture is requi red for playback</title>
4 <script src=media-file.js></script>
5 <script src=video-test.js></script>
6 <script>
7 if (window.internals)
8 window.internals.settings.setMediaPlaybackRequiresUserGesture(tr ue);
9
10 function testPlay()
11 {
12 failTest("play event should not fire without user gesture.");
13 }
14
15 function testPaused()
16 {
17 testExpected("video.paused", true);
18 endTest();
19 }
20
21 function canplaythrough()
22 {
23 setTimeout(testPaused, 100);
24 }
25
26 function start()
27 {
28 findMediaElement();
29 video.src = findMediaFile("video", "content/test");
30 testExpected("video.paused", true);
31 waitForEvent('canplaythrough', canplaythrough);
32 waitForEvent('play', testPlay);
33 }
34 </script>
35 </head>
36
37 <body onload="start()">
38 <p>Test that media autoplay should not work if user gesture is required for playback.</p>
39 <video controls autoplay></video>
40 </body>
41 </html>
OLDNEW
« no previous file with comments | « LayoutTests/FlakyTests ('k') | LayoutTests/media/no-autoplay-with-user-gesture-requirement-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698