| <script src="../../../resources/js-test-pre.js"></script> |
| <script src="../resources/media-controls-loader.js" type="text/javascript"></script> |
| <body> |
| <script type="text/javascript"> |
| |
| description("Testing the <code>MacOSFullscreenMediaControls</code> constructor."); |
| |
| const mediaControls = new MacOSFullscreenMediaControls; |
| |
| shouldBeEqualToString("mediaControls.element.localName", "div"); |
| shouldBeEqualToString("mediaControls.element.className", "media-controls mac fullscreen"); |
| shouldBeType("mediaControls.layoutTraits", "MacOSLayoutTraits"); |
| shouldBeTrue("mediaControls.layoutTraits.isFullscreen") |
| |
| debug(""); |
| debug("Controls bar"); |
| shouldBe("mediaControls.bottomControlsBar.children.length", "4"); |
| shouldBeType("mediaControls.bottomControlsBar.children[1]", "ButtonsContainer"); |
| shouldBeType("mediaControls.bottomControlsBar.children[2]", "ButtonsContainer"); |
| shouldBeType("mediaControls.bottomControlsBar.children[3]", "ButtonsContainer"); |
| |
| debug(""); |
| debug("Left container"); |
| shouldBe("mediaControls.bottomControlsBar.children[1].children", "[mediaControls.volumeSlider, mediaControls.muteButton]"); |
| shouldBeEqualToString("mediaControls.bottomControlsBar.children[1].element.className", "buttons-container left"); |
| shouldBe("mediaControls.bottomControlsBar.children[1].leftMargin", "12"); |
| shouldBe("mediaControls.bottomControlsBar.children[1].rightMargin", "0"); |
| shouldBe("mediaControls.bottomControlsBar.children[1].buttonMargin", "6"); |
| |
| debug(""); |
| debug("Center container"); |
| shouldBe("mediaControls.bottomControlsBar.children[2].children", "[mediaControls.rewindButton, mediaControls.playPauseButton, mediaControls.forwardButton]"); |
| shouldBeEqualToString("mediaControls.bottomControlsBar.children[2].element.className", "buttons-container center"); |
| shouldBe("mediaControls.bottomControlsBar.children[2].leftMargin", "27"); |
| shouldBe("mediaControls.bottomControlsBar.children[2].rightMargin", "27"); |
| shouldBe("mediaControls.bottomControlsBar.children[2].buttonMargin", "27"); |
| |
| debug(""); |
| debug("Right container"); |
| shouldBe("mediaControls.bottomControlsBar.children[3].children", "[mediaControls.airplayButton, mediaControls.pipButton, mediaControls.tracksButton, mediaControls.fullscreenButton, mediaControls.overflowButton]"); |
| shouldBeEqualToString("mediaControls.bottomControlsBar.children[3].element.className", "buttons-container right"); |
| shouldBe("mediaControls.bottomControlsBar.children[3].leftMargin", "12"); |
| shouldBe("mediaControls.bottomControlsBar.children[3].rightMargin", "12"); |
| shouldBe("mediaControls.bottomControlsBar.children[3].buttonMargin", "24"); |
| |
| debug(""); |
| |
| </script> |
| <script src="../../../resources/js-test-post.js"></script> |
| </body> |