[WPE] run-qt-wpe-minibrowser needlessly expects a --wpe argument
[WebKit-https.git] / LayoutTests / media / modern-media-controls / pip-support / ipad / pip-support-tap.html
1 <script src="../../../../resources/js-test-pre.js"></script>
2 <script src="../../resources/media-controls-loader.js" type="text/javascript"></script>
3 <script src="../../resources/media-controls-utils.js" type="text/javascript"></script>
4 <body>
5 <style type="text/css" media="screen">
6     
7     video, #host {
8         position: absolute;
9         top: 0;
10         left: 0;
11         width: 768px;
12         height: 240px;
13     }
14     
15 </style>
16 <video src="../../../content/test.mp4" autoplay controls></video>
17 <div id="host"></div>
18 <script type="text/javascript">
19
20 window.jsTestIsAsync = true;
21
22 description("Testing the <code>PiPSupport</code> behavior when clicking the PiP button.");
23
24 const container = document.querySelector("div#host");
25 const media = document.querySelector("video");
26 const mediaController = createControls(container, media, null);
27
28 scheduler.frameDidFire = function() {
29     if (media.paused)
30         return;
31
32     if (pressOnElement(mediaController.controls.pipButton.element))
33         scheduler.frameDidFire = null;
34 };
35
36 media.addEventListener("webkitpresentationmodechanged", () => {
37     shouldBeEqualToString("media.webkitPresentationMode", "picture-in-picture");
38     container.remove();
39     media.remove();
40     finishMediaControlsTest();
41 });
42
43 </script>
44 <script src="../../../../resources/js-test-post.js"></script>
45 </body>