| OLD | NEW |
| 1 /* This is the helper function to run animation tests: | 1 /* This is the helper function to run animation tests: |
| 2 | 2 |
| 3 Test page requirements: | 3 Test page requirements: |
| 4 - The body must contain an empty div with id "result" | 4 - The body must contain an empty div with id "result" |
| 5 - Call this function directly from the <script> inside the test page | 5 - Call this function directly from the <script> inside the test page |
| 6 | 6 |
| 7 Function parameters: | 7 Function parameters: |
| 8 expected [required]: an array of arrays defining a set of CSS properties tha
t must have given values at specific times (see below) | 8 expected [required]: an array of arrays defining a set of CSS properties tha
t must have given values at specific times (see below) |
| 9 callbacks [optional]: a function to be executed immediately after animation
starts; | 9 callbacks [optional]: a function to be executed immediately after animation
starts; |
| 10 or, an object in the form {time: function} containing
functions to be | 10 or, an object in the form {time: function} containing
functions to be |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 values.push(computedStyle[i].getStringValue()); | 379 values.push(computedStyle[i].getStringValue()); |
| 380 else if (computedStyle[i].primitiveType === CSSPrimitiveValu
e.CSS_IDENT) | 380 else if (computedStyle[i].primitiveType === CSSPrimitiveValu
e.CSS_IDENT) |
| 381 values.push(computedStyle[i].cssText); | 381 values.push(computedStyle[i].cssText); |
| 382 else | 382 else |
| 383 values.push(computedStyle[i].getFloatValue(CSSPrimitiveV
alue.CSS_NUMBER)); | 383 values.push(computedStyle[i].getFloatValue(CSSPrimitiveV
alue.CSS_NUMBER)); |
| 384 break; | 384 break; |
| 385 case CSSValue.CSS_CUSTOM: | 385 case CSSValue.CSS_CUSTOM: |
| 386 // arbitrarily pick shadow-x and shadow-y | 386 // arbitrarily pick shadow-x and shadow-y |
| 387 if (property == 'box-shadow' || property == 'text-shadow') { | 387 if (property == 'box-shadow' || property == 'text-shadow') { |
| 388 var text = computedStyle[i].cssText; | 388 var text = computedStyle[i].cssText; |
| 389 // Shadow cssText looks like "rgb(0, 0, 255) 0px -3px 10px
0px" | 389 // Shadow cssText looks like "rgb(0, 0, 255) 0px -3px 10px
0px" and can be fractional. |
| 390 var shadowPositionRegExp = /\)\s*(-?\d+)px\s*(-?\d+)px/; | 390 var shadowPositionRegExp = /\)\s*(-?[\d.]+)px\s*(-?[\d.]+)
px/; |
| 391 var match = shadowPositionRegExp.exec(text); | 391 var match = shadowPositionRegExp.exec(text); |
| 392 var shadowXY = [parseInt(match[1]), parseInt(match[2])]; | 392 var shadowXY = [parseInt(match[1]), parseInt(match[2])]; |
| 393 values.push(shadowXY[0]); | 393 values.push(shadowXY[0]); |
| 394 values.push(shadowXY[1]); | 394 values.push(shadowXY[1]); |
| 395 } else | 395 } else |
| 396 values.push(computedStyle[i].cssText); | 396 values.push(computedStyle[i].cssText); |
| 397 break; | 397 break; |
| 398 } | 398 } |
| 399 } | 399 } |
| 400 computedValue = values.join(','); | 400 computedValue = values.join(','); |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 | 704 |
| 705 [1] If the CSS property name is "-webkit-transform", expected value must be
an array of 1 or more numbers corresponding to the matrix elements, | 705 [1] If the CSS property name is "-webkit-transform", expected value must be
an array of 1 or more numbers corresponding to the matrix elements, |
| 706 or a string which will be compared directly (useful if the expected value is
"none") | 706 or a string which will be compared directly (useful if the expected value is
"none") |
| 707 If the CSS property name is "-webkit-transform.N", expected value must be a
number corresponding to the Nth element of the matrix | 707 If the CSS property name is "-webkit-transform.N", expected value must be a
number corresponding to the Nth element of the matrix |
| 708 | 708 |
| 709 */ | 709 */ |
| 710 function runTransitionTest(expected, trigger, callbacks, doPixelTest, disablePau
seAnimationAPI) { | 710 function runTransitionTest(expected, trigger, callbacks, doPixelTest, disablePau
seAnimationAPI) { |
| 711 isTransitionsTest = true; | 711 isTransitionsTest = true; |
| 712 runAnimationTest(expected, callbacks, trigger, disablePauseAnimationAPI, doP
ixelTest); | 712 runAnimationTest(expected, callbacks, trigger, disablePauseAnimationAPI, doP
ixelTest); |
| 713 } | 713 } |
| OLD | NEW |