[Modern Media Controls] Implement the pageScaleFactor property
[WebKit-https.git] / LayoutTests / media / modern-media-controls / media-controller / media-controller-scale-factor.html
1 <!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
2 <script src="../../../resources/js-test-pre.js"></script>
3 <meta name="viewport" content="width=400">
4 <body>
5 <video src="../../content/test.mp4" style="position: absolute; top: 0; left: 0; width: 400px; height: 300px;" controls></video>
6 <script type="text/javascript">
7
8 window.jsTestIsAsync = true;
9
10 description("Testing the <code>MediaController</code> has a single container for captions and media controls.");
11
12 const media = document.querySelector("video");
13 const shadowRoot = window.internals.shadowRoot(media);
14
15 window.requestAnimationFrame(() => {
16     shouldBeEqualToString("shadowRoot.querySelector('.media-controls').style.width", "800px");
17     shouldBeEqualToString("shadowRoot.querySelector('.media-controls').style.height", "600px");
18     shouldBeEqualToString("shadowRoot.querySelector('.media-controls').style.zoom", "0.5");
19
20     debug("");
21     media.remove();
22     finishJSTest();
23 });
24
25 </script>
26 <script src="../../../resources/js-test-post.js"></script>
27 </body>