\r
/*attributeName属性の値*/\r
attrName: "",\r
+ \r
+ /*指定された属性の規定値*/\r
+ defaultValue: "",\r
\r
init: function(ele) {\r
this.push(ele);\r
this.to = ele.getAttributeNS(null, "to") || "";\r
this.attrName = ele.getAttributeNS(null, "attributeName") || "";\r
}\r
+ if (this.element) {\r
+ this.defaultValue = this.element.getAttributeNS(null, this.attrName)\r
+ || this.element.ownerDocument.defaultView.getComputedStyle(this.element, "").getPropertyValue(this.attrName);\r
+ }\r
}\r
});\r
\r
it("should be this for the value (limit value analysis)", function() {\r
expect($set.to).toBe("");\r
expect($set.attrName).toBe("");\r
+ expect($set.defaultValue).toBe("");\r
$set.init();\r
$set.init(ele);\r
expect($set.to).toBe("");\r
expect($set.attrName).toBe("");\r
- \r
+ \r
+ } );\r
+ /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/\r
+ it("should be this for the value (the valid partion on a spline mode )", function() {\r
ele.setAttributeNS(null, "to", "t1");\r
$set.init(ele);\r
expect($set.to).toBe("t1");\r
+ expect($set.attrName).toBe("");\r
+ expect($set.defaultValue).toBe("");\r
\r
ele.setAttributeNS(null, "attributeName", "tt1");\r
$set.init(ele);\r
+ expect($set.to).toBe("t1");\r
expect($set.attrName).toBe("tt1");\r
- } );\r
- /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/\r
- it("should be this for the value (the valid partion on a spline mode )", function() {\r
+ expect($set.defaultValue).toBe("");\r
+\r
+ ele.parentNode.setAttributeNS(null, "tt1", "undef");\r
+ $set.init(ele);\r
+ expect($set.defaultValue).toBe("undef");\r
} );\r
/*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/\r
it("should be this for the value (the invalid partion on a spline mode )", function() {\r