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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-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>Ensure overflow menu buttons are visible when expected.</title> 2 <title>Ensure overflow menu buttons are visible when expected.</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 11 matching lines...) Expand all
22 22
23 video.onloadeddata = t.step_func_done(function() { 23 video.onloadeddata = t.step_func_done(function() {
24 var overflowList = getOverflowList(video); 24 var overflowList = getOverflowList(video);
25 var overflowMenu = getOverflowMenuButton(video); 25 var overflowMenu = getOverflowMenuButton(video);
26 26
27 // Clicking on the overflow menu button should make the overflow list visibl e 27 // Clicking on the overflow menu button should make the overflow list visibl e
28 var coords = elementCoordinates(overflowMenu); 28 var coords = elementCoordinates(overflowMenu);
29 clickAtCoordinates(coords[0], coords[1]); 29 clickAtCoordinates(coords[0], coords[1]);
30 assert_not_equals(getComputedStyle(overflowList).display, "none"); 30 assert_not_equals(getComputedStyle(overflowList).display, "none");
31 31
32 // Click on an overflow menu item should close overflow list. 32 // Click anywhere outside the overflow menu should close overflow list.
33 var coords = elementCoordinates(overflowList); 33 var coords = coordinatesOutsideElement(overflowList);
34 clickAtCoordinates(coords[0], coords[1]); 34 clickAtCoordinates(coords[0], coords[1]);
35 assert_equals(getComputedStyle(overflowList).display, "none"); 35 assert_equals(getComputedStyle(overflowList).display, "none");
36 }); 36 });
37 }); 37 });
38 </script> 38 </script>
39 </body> 39 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698