From: dhrname Date: Mon, 5 Oct 2015 14:03:09 +0000 (+0900) Subject: Modify the Spec X-Git-Tag: version22~61 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=98e3ad7223b6ead9d0ed3d35a4241c3872b90d94;p=sie%2Fsie.git Modify the Spec --- diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index 53f6630..e5b3937 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -1192,6 +1192,15 @@ base("$calcMode").up("$attribute").mix( { /*$svgEventオブジェクトは、SVGEvent発火を監視するためのオブジェクト*/ base("$frame").up("$svgEvent").mix( { log: [], + setFrame: function(num) { + if (this.timelines.length > 0) { + this.log.push( { + frame: 0, + target: this.timelines[0].target + } ); + } + return this.$frame.setFrame(num); + } } ); function getDocument() diff --git a/tool/Spec/spec/SvgDomSpec.js b/tool/Spec/spec/SvgDomSpec.js index 54b0611..a62236f 100644 --- a/tool/Spec/spec/SvgDomSpec.js +++ b/tool/Spec/spec/SvgDomSpec.js @@ -4194,13 +4194,31 @@ describe("SMIL Animation Spec", function() { } ); } ); describe("$frame.$svgEvent object", function() { - var frame = base("$frame").$svgEvent; + var frame = base("$frame").$svgEvent, + p, ele; beforeEach( function() { - frame.timelines = []; + base("$frame").timelines = []; + p = document.createElementNS("http://www.w3.org/2000/svg", "g"); + ele = document.createElementNS("http://www.w3.org/2000/svg", "animate"); + p.appendChild(ele); } ); /*境界条件を調べておく (limit value analysis)*/ it("should be this for the value (limit value analysis)", function() { expect(frame.log).toEqual([]); + frame.setFrame(0); + expect(frame.log).toEqual([]); + base("$frame").addLine( base("$frame").$begin.up().mix({ + timelines: [], + begin: 0, + activeTime: 0, + target: ele + }) ); + frame.setFrame(0); + expect(frame.log).toEqual([ + { frame: 0, + target: ele + } + ]); } ); /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/ it("should be this for the value (the valid partion )", function() {