});
/*appendChildメソッドの同値分割をして、無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/
it("should be this for the value, when it calls a appendChild method (the invalid partion)", function() {
+ var sn = function() {
+ s.appendChild(t);
+ /*HIERARCHY_REQUEST_ERR DOMException */
+ t.appendChild(s);
+ },
+ tn = function() {
+ /*WRONG_DOCUMENT_ERR DOMException*/
+ s.appendChild(DOMImplementation.createDocument("svg", "svg").createElementNS("o","n"));
+ };
+ expect(sn).toThrow();
+ expect(tn).toThrow();
});
/*removeChildメソッドの同値分割をして、無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/
it("should be this for the value, when it calls a removeChild method (the invalid partion)", function() {
+ var sn = function() {
+ s.removeChild(s.cloneNode(false));
+ },
+ tn = function() {
+ /*NOT_FOUND_ERR DOMException*/
+ s.removeChild(DOMImplementation.createDocument("svg", "svg").createElementNS("o","n"));
+ };
+ expect(sn).toThrow();
+ expect(tn).toThrow();
});
/*replaceChildメソッドの同値分割をして、無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/
it("should be this for the value, when it calls a replaceChild method (the invalid partion)", function() {
+ s.appendChild(t);
+ t.appendChild(t.cloneNode(false))
+ var sn = function() {
+ /*HIERARCHY_REQUEST_ERR DOMException */
+ t.replaceChild(s, t.firstChild);
+ },
+ tn = function() {
+ /*WRONG_DOCUMENT_ERR DOMException*/
+ s.replaceChild(DOMImplementation.createDocument("svg", "svg").createElementNS("o","n"), s.firstChild);
+ },
+ un = function() {
+ /*NOT_FOUND_ERR DOMException*/
+ s.replaceChild(t, t.cloneNode(false));
+ };
+ expect(sn).toThrow();
+ expect(tn).toThrow();
+ expect(un).toThrow();
});
- /*hasChildNodesメソッドの同値分割をして、無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/
- it("should be this for the value, when it calls a hasChildNodes method (the invalid partion)", function() {
- });
- /*cloneNodeメソッドの同値分割をして、無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/
- it("should be this for the value, when it calls a cloneNode method (the invalid partion)", function() {
- });
- /*normalizeメソッドの同値分割をして、無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/
- it("should be this for the value, when it calls a normalize method (the invalid partion)", function() {
- });
- /*isSupportedメソッドの同値分割をして、無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/
- it("should be this for the value, when it calls a isSupported method (the invalid partion)", function() {
- });
- /*hasAttributesメソッドの同値分割をして、無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/
- it("should be this for the value, when it calls a hasAttributes method (the invalid partion)", function() {
+ });
+ describe("DOM level 2 Core :: Document", function() {
+ /*まずは、あるべきデフォルト値かどうかをチェックしていく(Checking the default value of a Document interface.)*/
+ it("for the default value on the property of Document", function() {
+ expect(doc.doctype).toBeNull();
+ expect(svg.ownerDocument).toEqual(doc);
+ expect(svg.nodeName).toEqual("svg");
+ expect(svg.namespaceURI).toEqual("http://www.w3.org/2000/svg");
});
});
});
\ No newline at end of file