| Index: third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-correct-ordering.html
|
| diff --git a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-correct-ordering.html b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-correct-ordering.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d02a6063be52ec61b31c60ece80409af2e2cfa38
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-correct-ordering.html
|
| @@ -0,0 +1,45 @@
|
| +<!DOCTYPE html>
|
| +<title>Overflow menu children appear in correct order.</title>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script src="media-controls.js"></script>
|
| +<script src="media-file.js"></script>
|
| +<script src="overflow-menu.js"></script>
|
| +
|
| +<!--Padding ensures the overflow menu is visible for the tests. -->
|
| +<body style="padding-top: 200px; padding-left: 100px">
|
| +<video controls></video>
|
| +<script>
|
| +async_test(function(t) {
|
| + // Set up video
|
| + var video = document.querySelector("video");
|
| + video.src = findMediaFile("video", "content/test");
|
| + video.setAttribute("width", "60");
|
| + // Add captions
|
| + var track = video.addTextTrack("captions");
|
| + // Pretend we have a cast device
|
| + internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true);
|
| +
|
| + video.onloadeddata = t.step_func_done(function() {
|
| + var overflowList = getOverflowList(video);
|
| + var children = overflowList.children;
|
| +
|
| + // The overflow menu should always have the same number of elements.
|
| + // Their visibility will change over time based on the size of the video.
|
| + assert_equals(children.length, 5);
|
| +
|
| + // Ensure that all of the buttons are visible in the right order
|
| + for (var i = 0; i < children.length; i++) {
|
| + var child = children[i];
|
| + var innerButton = child.children[0];
|
| + assert_equals(internals.shadowPseudoId(child), "-internal-media-controls-overflow-menu-list-item");
|
| + assert_equals(internals.shadowPseudoId(innerButton), overflowButtonsCSS[i]);
|
| + // Items should be visible
|
| + assert_not_equals(getComputedStyle(child).display, "none");
|
| + // Buttons shouldn't be visible
|
| + assert_equals(getComputedStyle(innerButton).display, "none");
|
| + }
|
| + });
|
| +});
|
| +</script>
|
| +</body>
|
|
|