From c88f253ebbd84870f9b797763b7985b1f0b5a0d6 Mon Sep 17 00:00:00 2001 From: dhrname Date: Sun, 8 Feb 2015 22:33:36 +0900 Subject: [PATCH] Add the Spec for a object --- org/w3c/dom/smil.js | 15 +++++++++++---- tool/Spec/spec/SvgDomSpec.js | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index 7fa3f6f..c89b63e 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -307,7 +307,13 @@ base("$frame").mix ( { /*活動をストップさせるためのオブジェクト*/ end: $frame.$begin.up("$end"), - + + /*リピート回数*/ + repeatCount: null, + + /*繰り返し時間*/ + repeatDur: null, + /*解決した(計算する)ときの時間*/ resolvedTime: function() { return Date.now(); @@ -317,10 +323,11 @@ base("$frame").mix ( { * base.jsのofメソッドを活用して、関数型っぽい処理をする * 以下では、活動持続時間を算出*/ call: function() { - var isIndefiniteDur = (this.dur === "indefinite"), - isIndefiniteEnd = (this.end === this.$begin.$end), + var isIndefDur = (this.dur === "indefinite"), + isIndefRepeatCount = (this.repeatCount === "indefinite"), + isIndefRepeatDur = (this.repeatDur === "indefinite"), actTime = null; - if (!isIndefiniteDur) { + if (!isIndefDur) { actTime = Math.floor( this.offset(this.dur) * this.fpms); } return actTime; diff --git a/tool/Spec/spec/SvgDomSpec.js b/tool/Spec/spec/SvgDomSpec.js index 54f4cf4..59b26a1 100644 --- a/tool/Spec/spec/SvgDomSpec.js +++ b/tool/Spec/spec/SvgDomSpec.js @@ -2407,6 +2407,24 @@ describe("SMIL Animation Spec", function() { } ); } ); } ); + describe("A $end object", function() { + var end = base("$frame").$begin.$end; + beforeEach( function() { + end.string = ""; + } ); + /*境界条件を調べておく (limit value analysis)*/ + it("should be this for the value (limit value analysis)", function() { + + } ); + /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/ + it("should be this for the value (the valid partion)", function() { + + } ); + /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/ + it("should be this for the value (the invalid partion)", function() { + + } ); + } ); describe("A $activate object", function() { var act = base("$frame").$begin.$activate; beforeEach( function() { @@ -2419,6 +2437,8 @@ describe("SMIL Animation Spec", function() { expect(act.dur).toBe("indefinite"); expect(typeof act.resolvedTime).toBe("function"); expect(act.end).toBe(act.$begin.$end); + expect(act.repeatCount).toBeNull(); + expect(act.repeatDur).toBeNull(); act.up("$a"); expect(act.$a.call()).toBeNull(); -- 2.11.0