svnno****@sourc*****
svnno****@sourc*****
2011年 2月 6日 (日) 20:25:10 JST
Revision: 2370 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2370 Author: dhrname Date: 2011-02-06 20:25:09 +0900 (Sun, 06 Feb 2011) Log Message: ----------- createSVGTransformメソッドのチェックを追加 Modified Paths: -------------- trunk/Spec/spec/SvgDomSpec.js Modified: trunk/Spec/spec/SvgDomSpec.js =================================================================== --- trunk/Spec/spec/SvgDomSpec.js 2011-02-05 12:15:42 UTC (rev 2369) +++ trunk/Spec/spec/SvgDomSpec.js 2011-02-06 11:25:09 UTC (rev 2370) @@ -556,4 +556,45 @@ } }); }); + describe("SVG Unit :: SVG Transform", function() { + var s; + beforeEach(function() { + s = svg.createSVGTransform(); + }); + it("for the default value on the property of SVGTransform", function() { + /*5.11.2 Interface SVGSVGElement + *http://www.w3.org/TR/SVG/struct.html#InterfaceSVGSVGElement + * + * *The object is initialized to an identity matrix transform (SVG_TRANSFORM_MATRIX). + */ + expect(s.type).toEqual(1); + expect(s.angle).toEqual(0); + var d = s.matrix; + expect(d.a).toEqual(1); + expect(d.b).toEqual(0); + expect(d.c).toEqual(0); + expect(d.d).toEqual(1); + expect(d.e).toEqual(0); + expect(d.f).toEqual(0); + d = null; + }); + it("for the default value on the property of SVGTransform", function() { + /*7.14.4 Interface SVGTransform + *http://www.w3.org/TR/SVG/coords.html#InterfaceSVGTransform + * + * *void setMatrix(in SVGMatrix matrix) + * *values from the parameter matrix are copied, the matrix parameter does not replace SVGTransform::matrix. + */ + expect(s.type).toEqual(1); + expect(s.angle).toEqual(0); + var d = s.matrix; + expect(d.a).toEqual(1); + expect(d.b).toEqual(0); + expect(d.c).toEqual(0); + expect(d.d).toEqual(1); + expect(d.e).toEqual(0); + expect(d.f).toEqual(0); + d = null; + }); + }); }); \ No newline at end of file