| <script src="../../../resources/js-test-pre.js"></script> |
| <script src="../resources/media-controls-utils.js" type="text/javascript"></script> |
| <script src="../resources/media-controls-loader.js" type="text/javascript"></script> |
| <body> |
| <div id="container"></div> |
| <style type="text/css" media="screen"> |
| |
| #container { |
| position: absolute; |
| top: 0; |
| left: 0; |
| width: 800px; |
| height: 600px; |
| } |
| |
| </style> |
| <script type="text/javascript"> |
| |
| description("Testing the <code>MacOSFullscreenMediaControls</code> computed styles."); |
| |
| window.jsTestIsAsync = true; |
| |
| const mediaControls = new MacOSFullscreenMediaControls; |
| document.getElementById("container").appendChild(mediaControls.element); |
| |
| let style, bounds; |
| shouldBecomeEqual("document.body.contains(mediaControls.bottomControlsBar.element)", "true", () => { |
| style = window.getComputedStyle(mediaControls.bottomControlsBar.element); |
| bounds = mediaControls.bottomControlsBar.element.getBoundingClientRect(); |
| |
| shouldBeEqualToString("style.bottom", "25px"); |
| shouldBeEqualToString("style.width", "468px"); |
| shouldBeEqualToString("style.height", "75px"); |
| shouldBeEqualToString("style.overflow", "visible"); |
| |
| shouldBe("bounds.left", "166"); |
| shouldBe("bounds.top", "500"); |
| shouldBe("bounds.width", "468"); |
| shouldBe("bounds.height", "75"); |
| |
| mediaControls.element.remove(); |
| |
| debug(""); |
| finishMediaControlsTest(); |
| }); |
| |
| </script> |
| <script src="../../../resources/js-test-post.js"></script> |
| </body> |