/*もともと属性がターゲットの要素につけられていたかどうか*/\r
isDefault: false,\r
\r
+ /*attributeType属性がCSSだったときや、autoで属性名がCSSプロパティ名だったときには、true*/\r
+ isCSS: false,\r
+ \r
/*指定した要素の属性値を取得するメソッド*/\r
getAttr: function(/*string*/ name, def) {\r
var nameSpace = null;\r
*/\r
return null;\r
}\r
+ /*属性タイプの設定*/\r
+ var attrType = this.getAttr("attributeType", "auto");\r
+ if (attrType === "CSS") {\r
+ this.isCSS = true;\r
+ } else if ((attrType === "auto") && this.element) {\r
+ if ( this.element.ownerDocument.defaultView.getComputedStyle(this.element, "")\r
+ .getPropertyValue(this.attrName) ) {\r
+ this.isCSS = true;\r
+ }\r
+ }\r
+ /*属性値の設定*/\r
this.attrName = this.getAttr("attributeName", "");\r
if (this.attrName.indexOf("xlink") > -1) {\r
this.attrNameSpace = "http://www.w3.org/1999/xlink";\r
expect(attr.element).toBeNull();\r
expect(attr.push()).toBeNull();\r
expect(attr.element).toBeNull();\r
+ expect(attr.isCSS).toBeFalsy();\r
expect(base("$frame").timelines.length).toBe(0);\r
\r
expect(attr.push(s)).toBeNull();\r
s.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", "#p34");\r
attr.push(s);\r
expect(attr.element).toBe(p3);\r
+ \r
+ /*attributeType属性のサポート*/\r
+ s.setAttributeNS(null, "attributeType", "CSS");\r
+ s.setAttributeNS(null, "values", "a;b;c");\r
+ attr.push(s);\r
+ expect(attr.isCSS).toBeTruthy();\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(attr.removeAttribute()).toBeUndefined();\r
expect(p4.hasAttributeNS(null, "display")).toBeFalsy();\r
expect(p4.style.getPropertyValue("display")).toBe("none");\r
+ \r
+ /*attributeType属性のサポート*/\r
+ s.setAttributeNS(null, "values", "a;b;c");\r
+ s.setAttributeNS(null, "attributeName", "display");\r
+ attr.isCSS = false;\r
+ attr.push(s);\r
+ expect(attr.isCSS).toBeTruthy();\r
} );\r
/*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/\r
it("should be this for the value (the invalid partion )", function() {\r