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

Side by Side Diff: LayoutTests/media/video-load-require-user-gesture.html

Issue 144663006: Remove the user gesture restriction for HTMLMediaElement::load() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: keep removeBehaviorsRestrictionsAfterFirstUserGesture() Created 6 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/media/video-load-require-user-gesture-expected.txt » ('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 <html>
2 <head>
3 <script src=media-file.js></script>
4 <script src=video-test.js></script>
5 <script>
6 var state = 0;
7 var userGestureInitiated = 0;
8
9 if (window.internals)
10 window.internals.settings.setMediaPlaybackRequiresUserGesture(tr ue);
11
12 function finishTest(success)
13 {
14 if (success)
15 endTest();
16 else
17 failTest("<b>Data loaded despite restriction.</b>");
18 }
19
20 function checkLoad()
21 {
22 consoleWrite("");
23
24 if (state == "load")
25 {
26 finishTest(true);
27 return;
28 }
29
30 state = "load";
31 consoleWrite("* Calling video.load() should not load any data.") ;
32 video.load();
33 setTimeout(checkLoad, 250);
34 }
35
36 function start()
37 {
38 findMediaElement();
39 waitForEvent('loadedmetadata', function() { finishTest(false) } );
40
41 state = "src";
42 consoleWrite("* Setting video.src, no data should load.");
43 video.src = findMediaFile("video", "content/test");
44 setTimeout(checkLoad, 250);
45 }
46 </script>
47 </head>
48
49 <body onload="start()">
50 <video controls preload=none></video>
51 <p>Test that video.load() should not cause media loading when user gestu re is required.</p>
52 </body>
53 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/video-load-require-user-gesture-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698