OSDN Git Service

Modify the object
authordhrname <dhrname@users.sourceforge.jp>
Fri, 6 Mar 2015 14:23:47 +0000 (23:23 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Fri, 6 Mar 2015 14:23:47 +0000 (23:23 +0900)
org/w3c/dom/smil.js
tool/Spec/spec/SvgDomSpec.js

index 55429ed..88339ac 100644 (file)
@@ -557,7 +557,7 @@ base("$from").of( {
    /*keySpline属性の値を設定*/\r
    keySpline: null,\r
    \r
-   from: base("$from"),\r
+   to: base("$from").$to,\r
    \r
    /*与えられたアニメーションの進捗率を使った時間の圧縮率を計算するための関数を返す*/\r
    call: function() {\r
@@ -566,7 +566,8 @@ base("$from").of( {
        if (!this.keyTime) {\r
          t = 0;\r
        } \r
-       return t / this.keyTime;\r
+       t = t / this.keyTime;\r
+       return t;\r
      }.bind(this);\r
    }\r
 } );\r
index d344c6f..ee805ce 100644 (file)
@@ -3099,11 +3099,11 @@ describe("SMIL Animation Spec", function() {
    } );\r
   describe("A $calcMode object", function() {\r
     var calc = base("$calcMode"),\r
-        from = calc.from;\r
+        to = calc.to;\r
      beforeEach( function() {\r
        calc = calc.up();\r
-       calc.from = from = from.up();\r
-       from.up("$to");\r
+       calc.to = to = to.up();\r
+       to.from = to.from.up();\r
      } );\r
     /*境界条件を調べておく (limit value analysis)*/\r
     it("should be this for the value  (limit value analysis)", function() {\r
@@ -3118,19 +3118,17 @@ describe("SMIL Animation Spec", function() {
     /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/\r
     it("should be this for the value (the valid partion)", function() {\r
       calc.keyTime = 0.5;\r
-      expect(calc.call()(0.2)).toEqual(0.4);\r
-      expect(calc.call()(0.3)).toEqual(0.6);\r
+      expect(calc.call()(0.2)).toBe("0.4");\r
+      expect(calc.call()(0.3)).toBe("0.6");\r
       /*もう一度確かめる*/\r
-      expect(calc.call()(0.2)).toEqual(0.4);\r
+      expect(calc.call()(0.2)).toBe("0.4");\r
       \r
       calc = base("$calcMode").up();\r
       calc.keyTime = 0.2;\r
-      from.string = "0s";\r
-      from.$to.string = "1s";\r
-      from.$to.degit = 1;\r
-      from.$to.call();\r
-      from.call();\r
-      expect(from.$to.advance(0.1)).toBe("0.5s");\r
+      to.from.string = "0s";\r
+      to.string = "1s";\r
+      to.degit = 1;\r
+      expect(calc.call()(0.1)).toBe("0.5s");\r
     } );\r
     /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/\r
     it("should be this for the value (the invalid partion)", function() {\r