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

Unified Diff: LayoutTests/media/media-controls.js

Issue 294963003: MediaVolumeSliderPart is not vertical (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added TC. Created 6 years, 7 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: LayoutTests/media/media-controls.js
diff --git a/LayoutTests/media/media-controls.js b/LayoutTests/media/media-controls.js
index 325b1c844bb036779d80ae5ea88832dfb5f21f2c..30da5ba7c7f3eaff3f03266baf70c73687df2b4d 100644
--- a/LayoutTests/media/media-controls.js
+++ b/LayoutTests/media/media-controls.js
@@ -21,13 +21,18 @@ function mediaControlsElement(first, id)
return null;
}
-function mediaControlsButtonCoordinates(element, id)
+function mediaControlsButton(element, id)
{
var controlID = "-webkit-media-controls-" + id;
var button = mediaControlsElement(internals.shadowRoot(element).firstChild, controlID);
if (!button)
throw "Failed to find media control element ID '" + id + "'";
+ return button;
+}
+function mediaControlsButtonCoordinates(element, id)
+{
+ var button = mediaControlsButton(element, id);
var buttonBoundingRect = button.getBoundingClientRect();
var x = buttonBoundingRect.left + buttonBoundingRect.width / 2;
var y = buttonBoundingRect.top + buttonBoundingRect.height / 2;
@@ -36,11 +41,7 @@ function mediaControlsButtonCoordinates(element, id)
function mediaControlsButtonDimensions(element, id)
{
- var controlID = "-webkit-media-controls-" + id;
- var button = mediaControlsElement(internals.shadowRoot(element).firstChild, controlID);
- if (!button)
- throw "Failed to find media control element ID '" + id + "'";
-
+ var button = mediaControlsButton(element, id);
var buttonBoundingRect = button.getBoundingClientRect();
return new Array(buttonBoundingRect.width, buttonBoundingRect.height);
}
« no previous file with comments | « LayoutTests/media/controls-volume-slider-keynav-expected.txt ('k') | Source/core/html/forms/RangeInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698