blob: e55a3d0876c19cda0a3fbd45d333bb540ba99abe [file] [log] [blame]
Test that different ways of changing an element's id all work properly.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
1. Check id after parsing.
PASS document.getElementById("a") is document.body
PASS document.body.id is "a"
PASS document.body.getAttributeNode("id").value is "a"
2. Change Attr.value.
PASS document.getElementById("a") is null
PASS document.getElementById("b") is document.body
PASS document.body.getAttributeNode("id").value is "b"
3. Change HTMLElement.id.
PASS document.getElementById("b") is null
PASS document.getElementById("c") is document.body
PASS document.body.getAttributeNode("id").value is "c"
4. Change id attribute via setAttribute().
PASS document.getElementById("c") is null
PASS document.getElementById("d") is document.body
PASS document.body.getAttributeNode("id").value is "d"
5. Change id attribute via setAttributeNS().
PASS document.getElementById("d") is null
PASS document.getElementById("e") is document.body
PASS document.body.getAttributeNode("id").value is "e"
6. Change Attr.nodeValue.
PASS document.getElementById("e") is null
PASS document.getElementById("f") is document.body
PASS document.body.id is "f"
PASS document.body.getAttribute("id") is "f"
PASS attrNode.value is "f"
12. Chnaging Attr.value.
PASS document.getElementById("i") is null
PASS document.getElementById("hi") is document.body
PASS document.body.id is "hi"
PASS document.body.getAttribute("id") is "hi"
PASS attrNode.value is "hi"
21. Remove an Attr node.
PASS document.body.id is ""
PASS document.getElementById("mn") is null
PASS document.body.getAttribute("id") is null
PASS document.body.getAttributeNode("id") is null
22. Add an Attr node.
PASS document.getElementById("o") is document.body
PASS document.body.id is "o"
PASS document.body.getAttribute("id") is "o"
23. Add an Attr node over an existing one.
PASS document.getElementById("o") is null
PASS document.getElementById("p") is document.body
PASS document.body.id is "p"
PASS document.body.getAttribute("id") is "p"
PASS successfullyParsed is true
TEST COMPLETE