OSDN Git Service

Add an end property to the . object
[sie/sie.git] / tool / Spec / spec / SvgDomSpec.js
index 15e3d05..edd03ce 100644 (file)
@@ -166,6 +166,7 @@ describe("SMIL Animation Spec", function() {
       expect(frame.ENDING).toBe(3);\r
       expect(frame.POSTWAITING).toBe(4);\r
       expect(frame.state).toBe(frame.WAITING);\r
+      expect(frame.end).toBe(0);\r
       \r
       expect(frame.beginList).toEqual({\r
               next: null,\r
@@ -205,6 +206,13 @@ describe("SMIL Animation Spec", function() {
         \r
       expect(frame.getMaxList(0, frame.beginList)).toBe(-1);\r
       expect(frame.getMaxList(0, frame.endList)).toBe(-1);\r
+      \r
+      frame.begin = 12;\r
+      frame.init();\r
+      expect(frame.state).toBe(frame.WAITING);\r
+      expect(frame.begin).toBe(0);\r
+      expect(frame.init()).toBe(frame);\r
+\r
     } );\r
     /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/\r
     it("should be this for the value (the valid partion)", function() {\r
@@ -260,6 +268,7 @@ describe("SMIL Animation Spec", function() {
       expect(frame.updateState(0).state).toBe(frame.PLAYING);\r
       expect(frame.begin).toBe(0);\r
       expect(frame.updateState(1).state).toBe(frame.ENDING);\r
+      expect(frame.end).toBe(1);\r
       expect(frame.updateState(1).state).toBe(frame.BEGINNING);\r
       expect(frame.begin).toBe(1);\r
       expect(frame.updateState(1).state).toBe(frame.PLAYING);\r
@@ -281,6 +290,7 @@ describe("SMIL Animation Spec", function() {
       expect(frame.state).toBe(frame.PLAYING);\r
       expect(frame.updateState(3).state).toBe(frame.ENDING);\r
       expect(frame.state).toBe(frame.ENDING);\r
+      expect(frame.end).toBe(3);\r
       expect(frame.updateState(4).state).toBe(frame.POSTWAITING);\r
       expect(frame.state).toBe(frame.POSTWAITING);\r
       \r
@@ -292,6 +302,7 @@ describe("SMIL Animation Spec", function() {
       expect(frame.state).toBe(frame.PLAYING);\r
       expect(frame.updateState(3).state).toBe(frame.ENDING);\r
       expect(frame.state).toBe(frame.ENDING);\r
+      expect(frame.end).toBe(3);\r
       expect(frame.updateState(4).state).toBe(frame.POSTWAITING);\r
       expect(frame.state).toBe(frame.POSTWAITING);\r
       expect(frame.updateState(4).state).toBe(frame.POSTWAITING);\r
@@ -300,6 +311,7 @@ describe("SMIL Animation Spec", function() {
       appendEnd(1);\r
       expect(frame.updateState(1).state).toBe(frame.BEGINNING);\r
       expect(frame.updateState(1).state).toBe(frame.ENDING);\r
+      expect(frame.end).toBe(1);\r
       expect(frame.updateState(1).state).toBe(frame.POSTWAITING);\r
     } );\r
     /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/\r
@@ -2990,7 +3002,7 @@ describe("SMIL Animation Spec", function() {
           expect(p.__transformList[1].isPlaying).toBeTruthy();\r
           $animate._setEndFrame(1);\r
           expect(p.__transformList[0].isPlaying).toBeTruthy();\r
-          expect(p.__transformList[1].isPlaying).toBeTruthy();\r
+          expect(p.__transformList[1].isPlaying).toBeFalsy();\r
           \r
           delete p.__transformList;\r
           ele.setAttributeNS(null, "type", "scale");\r