blob: 608c7fe348a09b4bf441602b88071b2996fa49bf [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ dumpJSConsoleLogInStdErr=true ] -->
<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>WatchOSMediaControls</code> layout.");
const mediaControls = new WatchOSMediaControls;
debug("With controls at their default state (paused) only the play button is showing.");
shouldBe("mediaControls.children", "[mediaControls.playButton]");
debug("");
mediaControls.state = WatchOSMediaControls.State.Pending;
debug("With controls at pending state, only the activity indicator is showing.");
shouldBe("mediaControls.children", "[mediaControls.activityIndicator]");
debug("");
mediaControls.state = WatchOSMediaControls.State.Invalid;
debug("With controls at invalid state, only the invalid icon is showing.");
shouldBe("mediaControls.children", "[mediaControls.invalidButton]");
debug("");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>