From 792d312f3479104582943382ff865bb667969c55 Mon Sep 17 00:00:00 2001 From: dhrname Date: Sun, 9 Oct 2016 22:48:52 +0900 Subject: [PATCH] Edit the Spec for the setFrame method --- org/w3c/dom/smil.js | 1 + tool/Spec/spec/SvgDomSpec.js | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index 05893cd..1713540 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -219,6 +219,7 @@ base("$frame").mix ( { this.updateState(f); } } + state = void 0; } } ); diff --git a/tool/Spec/spec/SvgDomSpec.js b/tool/Spec/spec/SvgDomSpec.js index d41a5ad..33f54a6 100644 --- a/tool/Spec/spec/SvgDomSpec.js +++ b/tool/Spec/spec/SvgDomSpec.js @@ -343,6 +343,27 @@ describe("SMIL Animation Spec", function() { expect(frame.state).toBe(frame.PLAYING); frame.setFrame(2); expect(frame.state).toBe(frame.PLAYING); + + function appendEnd(num) { + frame.state = frame.WAITING; + frame.begin = 0; + frame.endList = { + value: num, + next: frame.endList + }; + }; + + appendEnd(3); + frame.setFrame(0); + expect(frame.state).toBe(frame.PLAYING); + frame.setFrame(1); + expect(frame.state).toBe(frame.PLAYING); + frame.setFrame(2); + expect(frame.state).toBe(frame.PLAYING); + frame.setFrame(3); + expect(frame.state).toBe(frame.POSTWAITING); + frame.setFrame(4); + expect(frame.state).toBe(frame.POSTWAITING); } ); } ); } ); -- 2.11.0