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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 var shapeFunction = s.match(/(\w+)\((.+)\)/); | 74 var shapeFunction = s.match(/(\w+)\((.+)\)/); |
75 if (!shapeFunction) | 75 if (!shapeFunction) |
76 return null; | 76 return null; |
77 | 77 |
78 var matches; | 78 var matches; |
79 switch (shapeFunction[1]) { | 79 switch (shapeFunction[1]) { |
80 case "rectangle": | 80 case "rectangle": |
81 matches = s.match("rectangle\\((.*)\\s*,\\s*(.*)\\s*,\\s*(.*)\\,\\s*(.*)
\\)"); | 81 matches = s.match("rectangle\\((.*)\\s*,\\s*(.*)\\s*,\\s*(.*)\\,\\s*(.*)
\\)"); |
82 break; | 82 break; |
83 case "circle": | 83 case "circle": |
84 matches = s.match("circle\\((.*)\\s*,\\s*(.*)\\s*,\\s*(.*)\\)"); | 84 matches = s.match("circle\\((.*)\\s+at\\s+(.*)\\s+(.*)\\)"); |
85 break; | 85 break; |
86 case "ellipse": | 86 case "ellipse": |
87 matches = s.match("ellipse\\((.*)\\s*,\\s*(.*)\\s*,\\s*(.*)\\,\\s*(.*)\\
)"); | 87 matches = s.match("ellipse\\((.*)\\s*,\\s*(.*)\\s*,\\s*(.*)\\,\\s*(.*)\\
)"); |
88 break; | 88 break; |
89 case "polygon": | 89 case "polygon": |
90 matches = s.match("polygon\\(nonzero, (.*)\\s+(.*)\\s*,\\s*(.*)\\s+(.*)\
\s*,\\s*(.*)\\s+(.*)\\s*,\\s*(.*)\\s+(.*)\\)"); | 90 matches = s.match("polygon\\(nonzero, (.*)\\s+(.*)\\s*,\\s*(.*)\\s+(.*)\
\s*,\\s*(.*)\\s+(.*)\\s*,\\s*(.*)\\s+(.*)\\)"); |
91 break; | 91 break; |
92 default: | 92 default: |
93 return null; | 93 return null; |
94 } | 94 } |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 | 694 |
695 [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, | 695 [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, |
696 or a string which will be compared directly (useful if the expected value is
"none") | 696 or a string which will be compared directly (useful if the expected value is
"none") |
697 If the CSS property name is "-webkit-transform.N", expected value must be a
number corresponding to the Nth element of the matrix | 697 If the CSS property name is "-webkit-transform.N", expected value must be a
number corresponding to the Nth element of the matrix |
698 | 698 |
699 */ | 699 */ |
700 function runTransitionTest(expected, trigger, callbacks, doPixelTest, disablePau
seAnimationAPI) { | 700 function runTransitionTest(expected, trigger, callbacks, doPixelTest, disablePau
seAnimationAPI) { |
701 isTransitionsTest = true; | 701 isTransitionsTest = true; |
702 runAnimationTest(expected, callbacks, trigger, disablePauseAnimationAPI, doP
ixelTest); | 702 runAnimationTest(expected, callbacks, trigger, disablePauseAnimationAPI, doP
ixelTest); |
703 } | 703 } |
OLD | NEW |