OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Clicking on the overflow closed captions button shows the closed captions
menu.</title> | 2 <title>Clicking on the overflow closed captions button shows the closed captions
menu.</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"> |
(...skipping 17 matching lines...) Expand all Loading... |
28 // Initially the list should not be visible | 28 // Initially the list should not be visible |
29 assert_equals(getComputedStyle(captionsList).display, "none"); | 29 assert_equals(getComputedStyle(captionsList).display, "none"); |
30 | 30 |
31 // Click on the overflow menu button | 31 // Click on the overflow menu button |
32 var coords = elementCoordinates(overflowMenu); | 32 var coords = elementCoordinates(overflowMenu); |
33 clickAtCoordinates(coords[0], coords[1]); | 33 clickAtCoordinates(coords[0], coords[1]); |
34 | 34 |
35 // Click on the closed captions button | 35 // Click on the closed captions button |
36 var coords = elementCoordinates(overflowList.children[OverflowMenuButtons.CL
OSED_CAPTIONS]); | 36 var coords = elementCoordinates(overflowList.children[OverflowMenuButtons.CL
OSED_CAPTIONS]); |
37 clickAtCoordinates(coords[0], coords[1]); | 37 clickAtCoordinates(coords[0], coords[1]); |
38 assert_not_equals(getComputedStyle(captionsList).display, "none"); | 38 |
| 39 // Click on anywhere outside the closed captions list will close the list |
| 40 var coords = coordinatesOutsideElement(captionsList); |
| 41 clickAtCoordinates(coords[0], coords[1]); |
| 42 assert_equals(getComputedStyle(captionsList).display, "none"); |
39 }); | 43 }); |
40 }); | 44 }); |
41 </script> | 45 </script> |
42 </body> | 46 </body> |
OLD | NEW |