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

Unified Diff: LayoutTests/animations/resources/animation-test-helpers.js

Issue 22839023: Add support for the object-position CSS property. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 7 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
« no previous file with comments | « no previous file | LayoutTests/fast/css/object-position.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/animations/resources/animation-test-helpers.js
diff --git a/LayoutTests/animations/resources/animation-test-helpers.js b/LayoutTests/animations/resources/animation-test-helpers.js
index 78238385f85adad7bc0512e81d30f75341d823e3..7cf8465427727af8670acd917d4d842731e3bfc7 100644
--- a/LayoutTests/animations/resources/animation-test-helpers.js
+++ b/LayoutTests/animations/resources/animation-test-helpers.js
@@ -367,6 +367,19 @@ function checkExpectedTransitionValue(expected, index)
} else {
pass = isCloseEnough(computedCrossFade.percent, expectedValue, tolerance);
}
+ } else if (property == "object-position") {
+ computedValue = window.getComputedStyle(document.getElementById(elementId)).objectPosition;
+ var actualArray = computedValue.split(" ");
+ var expectedArray = expectedValue.split(" ");
+ if (actualArray.length != expectedArray.length) {
+ pass = false;
+ } else {
+ for (i = 0; i < expectedArray.length; ++i) {
+ pass = isCloseEnough(parseFloat(actualArray[i]), parseFloat(expectedArray[i]), tolerance);
+ if (!pass)
+ break;
+ }
+ }
} else {
var computedStyle = window.getComputedStyle(document.getElementById(elementId)).getPropertyCSSValue(property);
if (computedStyle.cssValueType == CSSValue.CSS_VALUE_LIST) {
« no previous file with comments | « no previous file | LayoutTests/fast/css/object-position.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698