OSDN Git Service

Add the state property to the object
authordhrname <dhrname@users.sourceforge.jp>
Tue, 27 Sep 2016 13:42:24 +0000 (22:42 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Tue, 27 Sep 2016 13:42:24 +0000 (22:42 +0900)
org/w3c/dom/smil.js
tool/Spec/spec/SvgDomSpec.js

index acda710..0d54fa3 100644 (file)
@@ -44,6 +44,12 @@ base("$frame").mix ( {
   /*現在のフレーム数*/\r
   currentFrame: 0,\r
   \r
+  /*現在の要素の状態を数値で示す(マジックナンバーは後述の大文字プロパティを使う)*/\r
+  state: 0,\r
+  \r
+  /*待機状態を示す定数*/\r
+  WAITING: 0,\r
+  \r
   /*アニメーションを開始させるメソッド*/\r
   startAnimation: function() {\r
     /*__step関数は最後に書く*/\r
index ed13e64..c83933c 100644 (file)
@@ -65,6 +65,9 @@ describe("SMIL Animation Spec", function() {
       expect(frame.isPaused).toBeFalsy();\r
       expect(frame.pauseAnimation()).toBeUndefined();\r
       expect(frame.isPaused).toBeTruthy();\r
+      \r
+      expect(frame.WAITING).toBe(0);\r
+      expect(frame.state).toBe(frame.WAITING);\r
     });\r
     /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/\r
     it("should be this for the value (the valid partion)", function() {\r