OSDN Git Service

Modify the Spec
authordhrname <dhrname@users.sourceforge.jp>
Mon, 5 Oct 2015 14:03:09 +0000 (23:03 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Mon, 5 Oct 2015 14:03:09 +0000 (23:03 +0900)
org/w3c/dom/smil.js
tool/Spec/spec/SvgDomSpec.js

index 53f6630..e5b3937 100644 (file)
@@ -1192,6 +1192,15 @@ base("$calcMode").up("$attribute").mix( {
 /*$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
index 54b0611..a62236f 100644 (file)
@@ -4194,13 +4194,31 @@ describe("SMIL Animation Spec", function() {
         } );\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