| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>Overflow menu appears at the right time.</title> | 2 <title>Overflow menu appears at the right time.</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 // At this width, the mute and cast button don't fit. Since we have | 17 // At this width, the mute and cast button don't fit. Since we have |
| 18 // two elements that don't fit, the overflow menu should be visible. | 18 // two elements that don't fit, the overflow menu should be visible. |
| 19 video.setAttribute("width", "240"); | 19 video.setAttribute("width", "240"); |
| 20 // Add captions | 20 // Add captions |
| 21 var track = video.addTextTrack("captions"); | 21 var track = video.addTextTrack("captions"); |
| 22 // Pretend we have a cast device | 22 // Pretend we have a cast device |
| 23 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true); | 23 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true); |
| 24 | 24 |
| 25 video.onloadeddata = t.step_func_done(function() { | 25 video.onloadeddata = t.step_func_done(function() { |
| 26 var overflowMenu = getOverflowMenuButton(video); | 26 var overflowMenu = getOverflowMenuButton(video); |
| 27 var overflowList = getOverflowList(video); | 27 var overflowList = getOverflowList(video); |
| 28 var children = overflowList.children; | 28 var children = overflowList.children; |
| 29 | 29 |
| 30 // Overflow menu button should be visible | 30 // Overflow menu button should be visible |
| 31 assert_not_equals(getComputedStyle(overflowMenu).display, "none"); | 31 assert_not_equals(getComputedStyle(overflowMenu).display, "none"); |
| 32 }); | 32 }); |
| 33 }); | 33 }); |
| 34 </script> | 34 </script> |
| 35 </body> | 35 </body> |
| OLD | NEW |