OSDN Git Service

Modify the updateState method
authordhrname <dhrname@users.sourceforge.jp>
Fri, 28 Oct 2016 13:14:42 +0000 (22:14 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Fri, 28 Oct 2016 13:14:42 +0000 (22:14 +0900)
org/w3c/dom/smil.js
tool/Spec/spec/SvgDomSpec.js

index 130068a..3918046 100644 (file)
@@ -189,7 +189,7 @@ base("$frame").mix ( {
           this.state = begin;\r
           /*beginプロパティに開始時刻をキャッシュ用に保存*/\r
           this.begin = startTime;\r
-        } else if (!f && !startTime) {\r
+        } else if (!startTime) {\r
           /*開始時刻が0ならば、アニメーションを開始*/\r
           this.state = begin;\r
         }\r
index 8c634a4..902c7a9 100644 (file)
@@ -428,8 +428,8 @@ describe("SMIL Animation Spec", function() {
           frame.setFrame(i);\r
         }\r
         \r
-        frame.beginList = frame.$list.beginList;\r
-        frame.endList = frame.$list.endList;\r
+        frame.beginList = base("$frame").$listbeginList;\r
+        frame.endList = base("$frame").$list.endList;\r
         frame.state = frame.WAITING;\r
         frame.begin = 0;\r
         var obj = { name: "", value: 0};\r
@@ -471,6 +471,14 @@ describe("SMIL Animation Spec", function() {
         frame.setFrame(0);\r
         expect(t).toBe(2);\r
         \r
+        t=0;\r
+        frame.begin = 0;\r
+        frame.state = frame.WAITING;\r
+        expect(frame.getMaxList(12, frame.endList)).toBe(0);\r
+        frame.setFrame(12);\r
+        expect(frame.state).toBe(frame.POSTWAITING);\r
+        expect(t).toBe(2);\r
+        \r
         /*addBeginListメソッドのチェックなど*/\r
         expect(frame.addBeginList(1).value).toBe(1);\r
         expect(frame.addBeginList(0).value).toBe(0);\r
@@ -2185,6 +2193,7 @@ describe("SMIL Animation Spec", function() {
         expect(ele.parentNode.getAttributeNS(null, "fill")).toBe("red");\r
         \r
         frame.setFrame(24);\r
+        expect($set.timeline.state).toBe($set.timeline.POSTWAITNG);\r
         expect(ele.parentNode.hasAttributeNS(null, "fill")).toBeFalsy();\r
       } );\r
       /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/\r