Index: third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-text.html |
diff --git a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-text.html b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-text.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9ea0cd2a6c844f0d0762718133d13f9f1eae4cef |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-text.html |
@@ -0,0 +1,34 @@ |
+<!DOCTYPE html> |
+<title>Overflow menu displays the correct text.</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"); |
+ // 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; |
+ // 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(child.textContent, overflowMenuText[i]); |
+ } |
+ }); |
+}); |
+</script> |
+</body> |