Commit a77c041f authored by timloh@chromium.org's avatar timloh@chromium.org

Don't require getPropertyCSSValue in animation fill-mode tests

As getPropertyCSSValue is no longer web-exposed, we should stop testing
it so we can delete the interface. In animation fill-mode tests, it
isn't needed as we can just call parseFloat(style.left), as we always
return values in the format "123px" and parseFloat drops trailing
characters.

BUG=428595

Review URL: https://codereview.chromium.org/707713005

git-svn-id: svn://svn.chromium.org/blink/trunk@184976 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent c869bd91
......@@ -90,7 +90,7 @@
for (var i=0; i < expectedValues.length; i++) {
var el = document.getElementById(expectedValues[i].id);
var expectedValue = expectedValues[i].end;
var realValue = window.getComputedStyle(el).getPropertyCSSValue("left").getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
var realValue = parseFloat(window.getComputedStyle(el).left);
log(expectedValue, realValue, false, expectedValues[i].id);
}
document.getElementById('result').innerHTML = result;
......@@ -103,7 +103,7 @@
for (var i=0; i < expectedValues.length; i++) {
var el = document.getElementById(expectedValues[i].id);
var expectedValue = expectedValues[i].start;
var realValue = window.getComputedStyle(el).getPropertyCSSValue("left").getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
var realValue = parseFloat(window.getComputedStyle(el).left);
log(expectedValue, realValue, true, expectedValues[i].id);
}
document.addEventListener("webkitAnimationEnd", animationEnded, false);
......
......@@ -120,7 +120,7 @@
for (var i=0; i < expectedValues.length; i++) {
var el = document.getElementById(expectedValues[i].id);
var expectedValue = expectedValues[i].end;
var realValue = window.getComputedStyle(el).getPropertyCSSValue("left").getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
var realValue = parseFloat(window.getComputedStyle(el).left);
if (Math.abs(expectedValue - realValue) < allowance) {
result += "PASS";
} else {
......@@ -138,7 +138,7 @@
for (var i=0; i < expectedValues.length; i++) {
var el = document.getElementById(expectedValues[i].id);
var expectedValue = expectedValues[i].start;
var realValue = window.getComputedStyle(el).getPropertyCSSValue("left").getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
var realValue = parseFloat(window.getComputedStyle(el).left);
if (Math.abs(expectedValue - realValue) < allowance) {
result += "PASS";
} else {
......
......@@ -93,7 +93,7 @@
for (var i=0; i < expectedValues.length; i++) {
var el = document.getElementById(expectedValues[i].id);
var expectedValue = expectedValues[i].end;
var realValue = window.getComputedStyle(el).getPropertyCSSValue("left").getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
var realValue = parseFloat(window.getComputedStyle(el).left);
if (Math.abs(expectedValue - realValue) < allowance) {
result += "PASS";
} else {
......@@ -111,7 +111,7 @@
for (var i=0; i < expectedValues.length; i++) {
var el = document.getElementById(expectedValues[i].id);
var expectedValue = expectedValues[i].start;
var realValue = window.getComputedStyle(el).getPropertyCSSValue("left").getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
var realValue = parseFloat(window.getComputedStyle(el).left);
if (Math.abs(expectedValue - realValue) < allowance) {
result += "PASS";
} else {
......
......@@ -67,7 +67,7 @@
for (var i=0; i < expectedEndValues.length; i++) {
var el = document.getElementById(expectedEndValues[i].id);
var expectedValue = expectedEndValues[i].value;
var realValue = window.getComputedStyle(el).getPropertyCSSValue("left").getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
var realValue = parseFloat(window.getComputedStyle(el).left);
if (Math.abs(expectedValue - realValue) < 5) {
result += "PASS";
} else {
......
......@@ -74,7 +74,7 @@
for (var i=0; i < expectedValues.length; i++) {
var el = document.getElementById(expectedValues[i].id);
var expectedValue = expectedValues[i].end;
var realValue = window.getComputedStyle(el).getPropertyCSSValue("left").getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
var realValue = parseFloat(window.getComputedStyle(el).left);
if (Math.abs(expectedValue - realValue) < allowance) {
result += "PASS";
} else {
......@@ -92,7 +92,7 @@
for (var i=0; i < expectedValues.length; i++) {
var el = document.getElementById(expectedValues[i].id);
var expectedValue = expectedValues[i].start;
var realValue = window.getComputedStyle(el).getPropertyCSSValue("left").getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
var realValue = parseFloat(window.getComputedStyle(el).left);
if (Math.abs(expectedValue - realValue) < allowance) {
result += "PASS";
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment