1 This test checks whether attribute names with uppercase work properly in HTML documents.
5 setAttribute(attr_name)
7 The following should be non-empty, true, or non-null.
9 getAttribute(attr_name) = attr_value
10 hasAttribute(attr_name) = true
11 getAttributeNode(attr_name) = [object Attr]
12 attributes.getNamedItem(attr_name) = [object Attr]
14 getAttributeNS(attr_name) = attr_value
15 hasAttributeNS(attr_name) = true
16 getAttributeNodeNS(attr_name) = [object Attr]
17 attributes.getNamedItemNS(attr_name) = [object Attr]
19 getAttribute(ATTR_NAME) = attr_value
20 hasAttribute(ATTR_NAME) = true
21 getAttributeNode(ATTR_NAME) = [object Attr]
22 attributes.getNamedItem(ATTR_NAME) = [object Attr]
24 The following should be empty, false, or null.
26 getAttributeNS(ATTR_NAME) = null
27 hasAttributeNS(ATTR_NAME) = false
28 getAttributeNodeNS(ATTR_NAME) = null
29 attributes.getNamedItemNS(ATTR_NAME) = null
31 The following should successfully remove the attribute.
33 setAttribute(attr_name); removeAttribute(attr_name)
34 hasAttribute(attr_name) = false
35 setAttribute(attr_name); removeAttributeNS(attr_name)
36 hasAttribute(attr_name) = false
37 setAttribute(attr_name); attributes.removeNamedItem(attr_name)
38 hasAttribute(attr_name) = false
39 setAttribute(attr_name); attributes.removeNamedItemNS(null, attr_name)
40 hasAttribute(attr_name) = false
42 setAttribute(attr_name); removeAttribute(ATTR_NAME)
43 hasAttribute(attr_name) = false
44 setAttribute(attr_name); attributes.removeNamedItem(ATTR_NAME)
45 hasAttribute(attr_name) = false
47 The following should fail to remove the attribute.
49 setAttribute(attr_name); removeAttributeNS(ATTR_NAME)
50 hasAttribute(attr_name) = true
52 The following should fail to remove the attribute with an exception.
54 attributes.removeNamedItemNS(ATTR_NAME) raised an exception as expected
55 hasAttribute(attr_name) = true
57 The following should set a lowercase attribute, so the result should be true.
59 setAttributeNS(attr_name)
60 hasAttribute(attr_name) = true
62 The following should set an uppercase attribute, so the result should be false.
64 setAttributeNS(ATTR_NAME)
65 hasAttribute(attr_name) = false