The id attribute

Summary

Harness status: OK

Found 17 tests

Details

ResultTest NameMessage
PassUser agents must associate the element with an id value for purposes of getElementById.
Asserts run
Pass
assert_equals(Element node <i id="abcd"></i>, Element node <i id="abcd"></i>)
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:53:9)
PassAssociation is exact and therefore case-sensitive for getElementById.
Asserts run
Pass
assert_equals(Element node <i id="ABCD"></i>, Element node <i id="ABCD"></i>)
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:57:9)
PassSpaces are allowed in an id and still make an association for getElementByID.
Asserts run
Pass
assert_equals(Element node <i id="a b"></i>, Element node <i id="a b"></i>)
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:61:9)
PassNon-ASCII is allowed in an id and still make an association for getElementById.
Asserts run
Pass
assert_equals(Element node <i id="åèiöú"></i>, Element node <i id="åèiöú"></i>)
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:65:9)
PassUser agents must associate the element with an id value for purposes of CSS.
Asserts run
Pass
assert_equals("1", "1")
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:71:9)
PassAssociation for CSS is exact and therefore case-sensitive.
Asserts run
Pass
assert_equals("2", "2")
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:75:9)
PassSpaces are allowed in an id and still make an association.
Asserts run
Pass
assert_equals("3", "3")
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:79:9)
PassNon-ASCII is allowed in an id and still make an association for CSS.
Asserts run
Pass
assert_equals("6", "6")
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:83:9)
PassThe id IDL attribute must reflect the id content attribute, for getting.
Asserts run
Pass
assert_equals("abcd", "abcd")
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:91:9)
PassThe id IDL attribute must reflect the id content attribute, for setting via IDL attribute.
Asserts run
Pass
assert_equals("xyz", "xyz")
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:96:9)
PassAfter setting id via id attribute, getElementById find the element by the new id.
Asserts run
Pass
assert_equals(Element node <i id="xyz"></i>, Element node <i id="xyz"></i>)
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:100:9)
PassAfter setting id via id attribute, getElementById doesn't find the element by the old id.
Asserts run
Pass
assert_equals(null, null)
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:104:9)
PassAfter setting id via id attribute, CSS association is via the new ID.
Asserts run
Pass
assert_equals("4", "4")
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:108:9)
PassThe id IDL attribute must reflect the id content attribute, for setting via setAttribute.
Asserts run
Pass
assert_equals("foobar", "foobar")
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:113:9)
PassAfter setting id via setAttribute attribute, getElementById find the element by the new id.
Asserts run
Pass
assert_equals(Element node <i id="foobar"></i>, Element node <i id="foobar"></i>)
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:117:9)
PassAfter setting id via setAttribute attribute, getElementById doesn't find the element by the old id.
Asserts run
Pass
assert_equals(null, null)
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:121:9)
PassAfter setting id via setAttribute attribute, CSS association is via the new ID.
Asserts run
Pass
assert_equals("5", "5")
    at Test.<anonymous> ( /html/dom/elements/global-attributes/id-attribute.html:125:9)