From d4197167e41d030f08443e47cc483b808651e635 Mon Sep 17 00:00:00 2001 From: dhrname Date: Mon, 20 Aug 2012 19:46:21 +0900 Subject: [PATCH] Add the Spec for a replaceChild method --- tool/Spec/spec/SvgDomSpec.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tool/Spec/spec/SvgDomSpec.js b/tool/Spec/spec/SvgDomSpec.js index 35136cd..0069e22 100644 --- a/tool/Spec/spec/SvgDomSpec.js +++ b/tool/Spec/spec/SvgDomSpec.js @@ -1419,6 +1419,25 @@ describe("SVG Spec in JavaScript", function() { }); /*replaceChildメソッドの境界条件を調べておく (limit value analysis, when it calls a replaceChild method)*/ it("should be this for the value, when it calls a replaceChild method (limit value analysis)", function() { + var u = doc.createElementNS("http://sie.sourceforge.jp/", "ho"); + s.insertBefore(t, null); + s.replaceChild(u, t); + expect(s.firstChild).toEqual(u) + expect(s.lastChild).toEqual(u) + expect(s.childNodes.item(0)).toEqual(u) + expect(s.nextSibling).toBeNull(); + expect(s.previousSibling).toBeNull(); + expect(s.parentNode).toBeNull(); + expect(u.parentNode).toEqual(s) + expect(u.nextSibling).toBeNull(); + expect(u.previousSibling).toBeNull(); + expect(u.firstChild).toBeNull(); + expect(u.lastChild).toBeNull(); + expect(t.parentNode).toBeNull(); + expect(t.nextSibling).toBeNull(); + expect(t.previousSibling).toBeNull(); + expect(t.firstChild).toBeNull(); + expect(t.lastChild).toBeNull(); }); /*hasChildNodesメソッドの境界条件を調べておく (limit value analysis, when it calls a hasChildNodes method)*/ it("should be this for the value, when it calls a hasChildNodes method (limit value analysis)", function() { -- 2.11.0