OSDN Git Service

Add the updateList method to the object
authordhrname <dhrname@users.sourceforge.jp>
Thu, 20 Oct 2016 12:15:43 +0000 (21:15 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Thu, 20 Oct 2016 12:15:43 +0000 (21:15 +0900)
org/w3c/dom/smil.js
tool/Spec/spec/SvgDomSpec.js

index 92197e1..a3aeaab 100644 (file)
@@ -437,8 +437,6 @@ base("$frame").mix ( {
       /*初期値を設定*/\r
       this.begin = 0;\r
       this.isResolved = false;\r
-      /*$listオブジェクトを更新*/\r
-      this.$list = this.$list.up();\r
       /*beginとend属性を考慮に入れないで、活動継続時間を求める*/\r
       var s = this.$activate.up();\r
       this.activeTime = s.call() || Number.MAX_VALUE;\r
@@ -457,6 +455,12 @@ base("$frame").mix ( {
       return this;\r
     },\r
     \r
+    /*$listオブジェクトを更新するメソッド*/\r
+    updateList: function() {\r
+      this.$list = this.$list.up();\r
+      return this;\r
+    }\r
+    \r
   /*$activate オブジェクト\r
    * 活動継続時間などを計算するための計算実体\r
    * $begin オブジェクトからの継承*/\r
index 12db12f..bf90ef5 100644 (file)
@@ -491,6 +491,9 @@ describe("SMIL Animation Spec", function() {
     it("should be this for the value (the valid partion)", function() {\r
       begin.string = " hoge ";\r
       expect(begin.string).toBe(" hoge ");\r
+      var $list = begin.$list;\r
+      expect(begin.$list).toBe($list);\r
+      expect(begin.updateList().$list).not.toBe($list);\r
     } );\r
     /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/\r
     it("should be this for the value (the invalid partion)", function() {\r