| <script src="../../../resources/js-test-pre.js"></script> |
| <script src="../resources/media-controls-loader.js" type="text/javascript"></script> |
| <script src="../resources/media-controls-utils.js" type="text/javascript"></script> |
| <body> |
| <script type="text/javascript"> |
| |
| description("Testing the <code>MacOSInlineMediaControls</code> layout with the <code>statusLabel</code> property set."); |
| |
| window.jsTestIsAsync = true; |
| |
| const mediaControls = new MacOSInlineMediaControls({ width: 680, height: 400 }); |
| |
| let numberOfFrames = 0; |
| scheduler.frameDidFire = function() |
| { |
| |
| numberOfFrames++; |
| |
| if (numberOfFrames == 1) { |
| debug("Default state"); |
| shouldBeFalse("mediaControls.statusLabel.enabled"); |
| shouldBeNull("mediaControls.statusLabel.parent"); |
| shouldBe("mediaControls.timeControl.parent", "mediaControls.bottomControlsBar"); |
| mediaControls.statusLabel.text = "Loading…"; |
| } else if (numberOfFrames == 2) { |
| debug(""); |
| debug("After setting statusLabel.text to a non-null string"); |
| shouldBeTrue("mediaControls.statusLabel.enabled"); |
| shouldBe("mediaControls.statusLabel.parent", "mediaControls.bottomControlsBar"); |
| shouldBeNull("mediaControls.timeControl.parent"); |
| debug(""); |
| finishMediaControlsTest(); |
| } |
| |
| }; |
| |
| </script> |
| <script src="../../../resources/js-test-post.js"></script> |
| </body> |