1 // http://whatwg.org/html#reflecting-content-attributes-in-idl-attributes
2 // http://whatwg.org/html#rules-for-parsing-non-negative-integers
3 function testUnsignedLong(interface, createElement
, attribute
)
7 var element
= createElement();
9 assert_equals(element
[attribute
], 0);
11 function t(input
, output
)
13 element
.setAttribute(attribute
, input
);
14 assert_equals(element
[attribute
], output
);
20 t("2147483647", 2147483647);
26 }, "get " + interface + "." + attribute
);
30 var element
= createElement();
32 assert_false(element
.hasAttribute(attribute
));
34 function t(input
, output
)
36 element
[attribute
] = input
;
37 assert_equals(element
.getAttribute(attribute
), output
);
41 t(2147483647, "2147483647");
46 }, "set " + interface + "." + attribute
);