Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-closed-captions-list-hide-on-click-outside.html

Issue 2382233002: Hide overflow menu/closed caption list when clicking outside the list (Closed)
Patch Set: applied Mounir's comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698