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

Unified Diff: third_party/WebKit/LayoutTests/media/overflow-menu.js

Issue 2243473002: Adding overflow menu to media player (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: small changes Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/media/overflow-menu.js
diff --git a/third_party/WebKit/LayoutTests/media/overflow-menu.js b/third_party/WebKit/LayoutTests/media/overflow-menu.js
new file mode 100644
index 0000000000000000000000000000000000000000..b03abfe0d36b4520861804c71b70e4e465768361
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/overflow-menu.js
@@ -0,0 +1,34 @@
+// We expect the items in the overflow to appear in the following ordering.
+var overflowButtonsCSS = [
+ "-webkit-media-controls-mute-button",
+ "-internal-media-controls-cast-button",
+ "-webkit-media-controls-toggle-closed-captions-button",
+ "-webkit-media-controls-fullscreen-button",
+ "-webkit-media-controls-play-button"];
+// PseudoID for the overflow button
+var menuID = "-internal-overflow-menu-button";
+// PseudoID for the overflow list
+var listID = "-internal-media-controls-overflow-menu-list";
+
+// Returns the overflow menu button within the given media element
+function getOverflowMenuButton(media) {
+ return mediaControlsElement(internals.shadowRoot(media).firstChild, menuID);
+}
+
+// Returns the overflow menu list of overflow controls
+function getOverflowList(media) {
+ return mediaControlsElement(internals.shadowRoot(media).firstChild, listID);
+}
+
+// Location of media control element in the overflow button
+var OverflowMenuButtons = {
+ MUTE: 0,
+ CAST: 1,
+ CLOSED_CAPTIONS: 2,
+ FULLSCREEN: 3,
+ PLAY: 4,
+};
+
+// Default text within the overflow menu
+var overflowMenuText = ["Mute", "Cast", "Captions", "Fullscreen", "Play"];
+

Powered by Google App Engine
This is Rietveld 408576698