this.isResolved = true;\r
}\r
this.begin = Math.floor( this.begin * this.fpms);\r
+ var s = this.$activate.up();\r
+ s.begin = this.begin;\r
+ s.end = s.end.up();\r
+ this.$$activate = s;\r
if (event) {\r
ele = event.id ? this.eventTarget.ownerDocument.getElementById(event.id)\r
: this.eventTarget;\r
ele && ele.addEventListener(event.event, this.listener.bind(this));\r
}\r
+ s = event = str = plusminus = ele = void 0;\r
return this;\r
},\r
\r
/*イベントのリスナーとして、parseメソッドで使う*/\r
listener: function(evt) {\r
- var s = this.$activate.up();\r
- s.begin = this.begin;\r
- s.end = s.end.up();\r
- s.timeStamp= evt.timeStamp;\r
+ var s = this.$$activate;\r
+ s.timeStamp = evt.timeStamp;\r
this.activeTime = s.call();\r
this.addLine(this);\r
- return s;\r
+ return this;\r
}\r
\r
/*$activate オブジェクト\r
describe("A listener method in $begin object", function() {\r
beforeEach( function() {\r
begin.string = "";\r
+ /*配列は初期化しておく*/\r
+ begin.timelines.length = 0;\r
} );\r
/*境界条件を調べておく (limit value analysis)*/\r
it("should be this for the value (limit value analysis)", function() {\r
- expect(begin.listener({\r
+ var lis = begin.listener( {\r
timeStamp: 0\r
- }).timeStamp).toEqual(0);\r
+ } );\r
+ expect(lis).toBe(begin);\r
+ expect(lis.begin).toBe(0);\r
+ expect(lis.activeTime).toBeNull();\r
+ expect(lis.timelines.length).toBe(0);\r
+ \r
+ lis = begin.up().mix( {\r
+ begin: 0,\r
+ dur: "12"\r
+ })\r
+ .listener( {\r
+ timeStamp: 0\r
+ } );\r
+ expect(lis.begin).toBe(0);\r
+ expect(lis.activeTime).toEqual(Math.floor(12000*lis.fpms));\r
} );\r
/*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/\r
it("should be this for the value (the valid partion)", function() {\r