/*$svgEventオブジェクトは、SVGEvent発火を監視するためのオブジェクト*/\r
base("$frame").up("$svgEvent").mix( {\r
log: [],\r
+ setFrame: function(num) {\r
+ if (this.timelines.length > 0) {\r
+ this.log.push( {\r
+ frame: 0,\r
+ target: this.timelines[0].target\r
+ } );\r
+ }\r
+ return this.$frame.setFrame(num);\r
+ }\r
} );\r
\r
function getDocument() \r
} );\r
} );\r
describe("$frame.$svgEvent object", function() {\r
- var frame = base("$frame").$svgEvent;\r
+ var frame = base("$frame").$svgEvent,\r
+ p, ele;\r
beforeEach( function() {\r
- frame.timelines = [];\r
+ base("$frame").timelines = [];\r
+ p = document.createElementNS("http://www.w3.org/2000/svg", "g");\r
+ ele = document.createElementNS("http://www.w3.org/2000/svg", "animate");\r
+ p.appendChild(ele);\r
} );\r
/*境界条件を調べておく (limit value analysis)*/\r
it("should be this for the value (limit value analysis)", function() {\r
expect(frame.log).toEqual([]);\r
+ frame.setFrame(0);\r
+ expect(frame.log).toEqual([]);\r
+ base("$frame").addLine( base("$frame").$begin.up().mix({\r
+ timelines: [],\r
+ begin: 0,\r
+ activeTime: 0,\r
+ target: ele\r
+ }) );\r
+ frame.setFrame(0);\r
+ expect(frame.log).toEqual([\r
+ { frame: 0,\r
+ target: ele\r
+ }\r
+ ]);\r
} );\r
/*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/\r
it("should be this for the value (the valid partion )", function() {\r