From b0a0dc0a83833cccba24a87e3ed9a741dfa4dced Mon Sep 17 00:00:00 2001 From: dhrname Date: Sat, 4 Apr 2015 23:16:55 +0900 Subject: [PATCH] New object --- org/w3c/dom/smil.js | 14 ++++++++++++++ tool/Spec/spec/SvgDomSpec.js | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index 5d3a351..e057706 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -674,4 +674,18 @@ Math.qubicnewton = function(a0, a1, a2, a3, b) { } return b; //収束しなかった結果 }; + +/*$attribute オブジェクト + * アニメーションの時間調整と、呈示値の調整を一つのオブジェクトにまとめて行うことで、 + * アニメーションサンドイッチの実装をする + * $calcModeオブジェクトから継承*/ +base("$calcMode").up("$attribute").mix( { + + /*前述の$frameオブジェクトでフレームを記述*/ + frame: base("$frame"), + + /*引数で指定した要素 ele の属性を解析して、フレームに追加する*/ + push: function() { + } +} ); //#endif // _SMIL_IDL_ diff --git a/tool/Spec/spec/SvgDomSpec.js b/tool/Spec/spec/SvgDomSpec.js index 40fe859..d92154c 100644 --- a/tool/Spec/spec/SvgDomSpec.js +++ b/tool/Spec/spec/SvgDomSpec.js @@ -3309,4 +3309,45 @@ describe("SMIL Animation Spec", function() { } ).toThrow("An Invalid Number Error"); } ); } ); + describe("A $attribute object", function() { + describe("An push method", function() { + var attr; + beforeEach( function() { + attr = base("$calcMode").$attribute.up("width"); + base("$frame").timelines.length = 0; + } ); + /*境界条件を調べておく (limit value analysis)*/ + it("should be this for the value (limit value analysis)", function() { + expect(attr.frame).toBe(base("$frame")); + attr.push(); + expect(attr.frame.timelines.length).toEqual(0); + + attr.push(document.documentElement); + expect(attr.frame.timelines.length).toEqual(0); + attr.push(document.createElement("animate")); + expect(attr.frame.timelines.length).toEqual(0); + } ); + /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/ + it("should be this for the value (the valid partion on a spline mode )", function() { + } ); + /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/ + it("should be this for the value (the invalid partion on a spline mode )", function() { + } ); + } ); + describe("A ", function() { + var attr; + beforeEach( function() { + attr = base("$calcMode").$attribute.up("width"); + } ); + /*境界条件を調べておく (limit value analysis)*/ + it("should be this for the value (limit value analysis)", function() { + } ); + /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/ + it("should be this for the value (the valid partion on a spline mode )", function() { + } ); + /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/ + it("should be this for the value (the invalid partion on a spline mode )", function() { + } ); + } ); + } ); } ); -- 2.11.0