$animate.defaultValue = $animate.$a.defaultValue;\r
expect($animate.tocall(0.1)).toBe("matrix(0 0 0 0 0 0) scale(0.1)");\r
\r
- /*子要素を全部消す*/\r
- while (parentNode.firstChild) {\r
- parentNode.removeChild(parentNode.firstChild);\r
- }\r
- \r
- /*additive属性のreplaceとsumの混合*/\r
ele.removeAttributeNS(null, "additive");\r
- parentNode.appendChild(ele.cloneNode(true));\r
- ele.setAttributeNS(null, "additive", "sum");\r
- parentNode.appendChild(ele.cloneNode(true));\r
- parentNode.__transformList = [];\r
- $animate.numberOfList = -1;\r
- parentNode.setAttribute("transform", "matrix(0 0 0 0 0 0)");\r
- $animate.up("$b").init(parentNode.firstChild);\r
- $animate.up("$c").init(parentNode.lastChild);\r
- expect($animate.$b.numberOfList).toBe(0);\r
- expect($animate.$c.numberOfList).toBe(1);\r
- expect($animate.$b.tocall(0)).toBe("scale(0.0)");\r
- expect($animate.$c.tocall(0)).toBe("scale(0.0) scale(0.0)");\r
- expect($animate.$b.tocall(1)).toBe("scale(1.0)");\r
- expect($animate.$c.tocall(1)).toBe("scale(1.0) scale(1.0)");\r
+ ad("replace", "sum");\r
+ function ad(first, second) {\r
+ /*子要素を全部消す*/\r
+ while (parentNode.firstChild) {\r
+ parentNode.removeChild(parentNode.firstChild);\r
+ }\r
+ \r
+ /*additive属性のreplaceとsumの混合*/\r
+ ele.setAttributeNS(null, "additive", first);\r
+ parentNode.appendChild(ele.cloneNode(true));\r
+ ele.setAttributeNS(null, "additive", second);\r
+ parentNode.appendChild(ele.cloneNode(true));\r
+ parentNode.__transformList = [];\r
+ $animate.numberOfList = -1;\r
+ parentNode.setAttribute("transform", "matrix(0 0 0 0 0 0)");\r
+ $animate.up("$b").init(parentNode.firstChild);\r
+ $animate.up("$c").init(parentNode.lastChild);\r
+ expect($animate.$b.numberOfList).toBe(0);\r
+ expect($animate.$c.numberOfList).toBe(1);\r
+ expect($animate.$b.tocall(0)).toBe("scale(0.0)");\r
+ expect($animate.$c.tocall(0)).toBe("scale(0.0) scale(0.0)");\r
+ expect($animate.$b.tocall(1)).toBe("scale(1.0)");\r
+ expect($animate.$c.tocall(1)).toBe("scale(1.0) scale(1.0)");\r
+ };\r
} );\r
/*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/\r
it("should be this for the value (the invalid partion )", function() {\r