chromium/third_party/blink/web_tests/fast/dom/Element/attribute-uppercase-expected.txt

This test checks whether attribute names with uppercase work properly in HTML documents.

Add an attribute:

    setAttribute(attr_name)

The following should be non-empty, true, or non-null.

    getAttribute(attr_name) = attr_value
    hasAttribute(attr_name) = true
    getAttributeNode(attr_name) = [object Attr]
    attributes.getNamedItem(attr_name) = [object Attr]

    getAttributeNS(attr_name) = attr_value
    hasAttributeNS(attr_name) = true
    getAttributeNodeNS(attr_name) = [object Attr]
    attributes.getNamedItemNS(attr_name) = [object Attr]

    getAttribute(ATTR_NAME) = attr_value
    hasAttribute(ATTR_NAME) = true
    getAttributeNode(ATTR_NAME) = [object Attr]
    attributes.getNamedItem(ATTR_NAME) = [object Attr]

The following should be empty, false, or null.

    getAttributeNS(ATTR_NAME) = null
    hasAttributeNS(ATTR_NAME) = false
    getAttributeNodeNS(ATTR_NAME) = null
    attributes.getNamedItemNS(ATTR_NAME) = null

The following should successfully remove the attribute.

    setAttribute(attr_name); removeAttribute(attr_name)
        hasAttribute(attr_name) = false
    setAttribute(attr_name); removeAttributeNS(attr_name)
        hasAttribute(attr_name) = false
    setAttribute(attr_name); attributes.removeNamedItem(attr_name)
        hasAttribute(attr_name) = false
    setAttribute(attr_name); attributes.removeNamedItemNS(null, attr_name)
        hasAttribute(attr_name) = false

    setAttribute(attr_name); removeAttribute(ATTR_NAME)
        hasAttribute(attr_name) = false
    setAttribute(attr_name); attributes.removeNamedItem(ATTR_NAME)
        hasAttribute(attr_name) = false

The following should fail to remove the attribute.

    setAttribute(attr_name); removeAttributeNS(ATTR_NAME)
        hasAttribute(attr_name) = true

The following should fail to remove the attribute with an exception.

    attributes.removeNamedItemNS(ATTR_NAME) raised an exception as expected
        hasAttribute(attr_name) = true

The following should set a lowercase attribute, so the result should be true.

    setAttributeNS(attr_name)
        hasAttribute(attr_name) = true

The following should set an uppercase attribute, so the result should be false.

    setAttributeNS(ATTR_NAME)
        hasAttribute(attr_name) = false