[Modern Media Controls] Turn media/modern-media-controls/ios-inline-media-controls...
[WebKit-https.git] / LayoutTests / media / video-user-gesture-tracking.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <title>video-user-gesture-tracking</title>
5     <script src=media-file.js></script>
6     <script src=video-test.js></script>
7     <script>
8     function runTest() {
9         run('window.internals.settings.setVideoPlaybackRequiresUserGesture(true);');
10         run('video = document.createElement("video")');
11         run('video.src = findMediaFile("video", "content/test")');
12         run('document.body.appendChild(video)');
13         testExpected("window.internals.pageMediaState().includes('HasUserInteractedWithMediaElement')", false);
14         runWithKeyDown(() => {
15             run('video.play()');
16         });
17         testExpected("window.internals.pageMediaState().includes('HasUserInteractedWithMediaElement')", true)
18         endTest();
19     }
20     </script>
21 </head>
22 <body onload="runTest()">
23 </body>
24 </html>