Commit 5b36b472 authored by timloh@chromium.org's avatar timloh@chromium.org

Don't require getPropertyCSSValue in svg number animation tests

As getPropertyCSSValue is no longer web-exposed we shouldn't require it
in tests so we can delete the interface.

BUG=428595

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

git-svn-id: svn://svn.chromium.org/blink/trunk@185010 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f5070963
......@@ -24,15 +24,15 @@ rootSVGElement.appendChild(rect);
// Setup animation test
function sample1() {
// Check initial/end conditions
shouldBeCloseEnough("getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0");
}
function sample2() {
shouldBeCloseEnough("getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0.5");
shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0.5");
}
function sample3() {
shouldBeCloseEnough("getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "1");
shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "1");
}
function executeTest() {
......
......@@ -24,15 +24,15 @@ rootSVGElement.appendChild(rect);
// Setup animation test
function sample1() {
// Check initial/end conditions
shouldBeCloseEnough("getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0");
}
function sample2() {
shouldBeCloseEnough("getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0.5");
shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0.5");
}
function sample3() {
shouldBeCloseEnough("getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "1");
shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "1");
}
function executeTest() {
......
......@@ -22,26 +22,18 @@ rect.appendChild(animate);
rootSVGElement.appendChild(rect);
// Setup animation test
function sample1() {
function sample() {
// Check initial/end conditions
shouldBe("getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
}
function sample2() {
shouldBe("getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
}
function sample3() {
shouldBe("getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
shouldBe("getComputedStyle(rect).opacity", "'0'");
}
function executeTest() {
const expectedValues = [
// [animationId, time, sampleCallback]
["animation", 0.0, sample1],
["animation", 2.0, sample2],
["animation", 3.999, sample3],
["animation", 4.001, sample1]
["animation", 0.0, sample],
["animation", 2.0, sample],
["animation", 3.999, sample],
["animation", 4.001, sample]
];
runAnimationTest(expectedValues);
......
......@@ -5,10 +5,10 @@ Test for SVGNumber animation.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
PASS getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0.5
PASS getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 1
PASS getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
PASS parseFloat(getComputedStyle(rect).opacity) is 0
PASS parseFloat(getComputedStyle(rect).opacity) is 0.5
PASS parseFloat(getComputedStyle(rect).opacity) is 1
PASS parseFloat(getComputedStyle(rect).opacity) is 0
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -5,10 +5,10 @@ Test for SVGNumber animation with different exponents.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
PASS getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0.5
PASS getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 1
PASS getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
PASS parseFloat(getComputedStyle(rect).opacity) is 0
PASS parseFloat(getComputedStyle(rect).opacity) is 0.5
PASS parseFloat(getComputedStyle(rect).opacity) is 1
PASS parseFloat(getComputedStyle(rect).opacity) is 0
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -5,10 +5,10 @@ Test for SVGNumber animation with invalid units.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
PASS getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
PASS getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
PASS getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
PASS getComputedStyle(rect).opacity is '0'
PASS getComputedStyle(rect).opacity is '0'
PASS getComputedStyle(rect).opacity is '0'
PASS getComputedStyle(rect).opacity is '0'
PASS successfullyParsed is true
TEST COMPLETE
......
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