OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Overflow menu displays the correct text.</title> | 2 <title>Overflow menu displays the correct text.</title> |
3 <script src="../resources/testharness.js"></script> | 3 <script src="../../resources/testharness.js"></script> |
4 <script src="../resources/testharnessreport.js"></script> | 4 <script src="../../resources/testharnessreport.js"></script> |
5 <script src="media-controls.js"></script> | 5 <script src="../media-controls.js"></script> |
6 <script src="media-file.js"></script> | 6 <script src="../media-file.js"></script> |
7 <script src="overflow-menu.js"></script> | 7 <script src="../overflow-menu.js"></script> |
8 | 8 |
9 <!--Padding ensures the overflow menu is visible for the tests. --> | 9 <!--Padding ensures the overflow menu is visible for the tests. --> |
10 <body style="padding-top: 200px; padding-left: 100px"> | 10 <body style="padding-top: 200px; padding-left: 100px"> |
11 <video controls></video> | 11 <video controls></video> |
12 <script> | 12 <script> |
13 async_test(function(t) { | 13 async_test(function(t) { |
14 // Set up video | 14 // Set up video |
15 var video = document.querySelector("video"); | 15 var video = document.querySelector("video"); |
16 video.src = findMediaFile("video", "content/test"); | 16 video.src = findMediaFile("video", "../content/test"); |
17 // Add captions | 17 // Add captions |
18 var track = video.addTextTrack("captions"); | 18 var track = video.addTextTrack("captions"); |
19 // Pretend we have a cast device | 19 // Pretend we have a cast device |
20 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true); | 20 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true); |
21 | 21 |
22 video.onloadeddata = t.step_func_done(function() { | 22 video.onloadeddata = t.step_func_done(function() { |
23 var overflowList = getOverflowList(video); | 23 var overflowList = getOverflowList(video); |
24 var children = overflowList.children; | 24 var children = overflowList.children; |
25 // Ensure that all of the buttons are visible in the right order | 25 // Ensure that all of the buttons are visible in the right order |
26 for (var i = 0; i < children.length; i++) { | 26 for (var i = 0; i < children.length; i++) { |
27 var child = children[i]; | 27 var child = children[i]; |
28 var innerButton = child.children[0]; | 28 var innerButton = child.children[0]; |
29 assert_equals(child.textContent, overflowMenuText[i]); | 29 assert_equals(child.textContent, overflowMenuText[i]); |
30 } | 30 } |
31 }); | 31 }); |
32 }); | 32 }); |
33 </script> | 33 </script> |
34 </body> | 34 </body> |
OLD | NEW |