1 Test that different ways of changing an element's id all work properly.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
7 1. Check id after parsing.
8 PASS document.getElementById("a") is document.body
9 PASS document.body.id is "a"
10 PASS document.body.getAttributeNode("id").value is "a"
13 PASS document.getElementById("a") is null
14 PASS document.getElementById("b") is document.body
15 PASS document.body.getAttributeNode("id").value is "b"
17 3. Change HTMLElement.id.
18 PASS document.getElementById("b") is null
19 PASS document.getElementById("c") is document.body
20 PASS document.body.getAttributeNode("id").value is "c"
22 4. Change id attribute via setAttribute().
23 PASS document.getElementById("c") is null
24 PASS document.getElementById("d") is document.body
25 PASS document.body.getAttributeNode("id").value is "d"
27 5. Change id attribute via setAttributeNS().
28 PASS document.getElementById("d") is null
29 PASS document.getElementById("e") is document.body
30 PASS document.body.getAttributeNode("id").value is "e"
32 6. Change Attr.nodeValue.
33 PASS document.getElementById("e") is null
34 PASS document.getElementById("f") is document.body
35 PASS document.body.id is "f"
36 PASS document.body.getAttribute("id") is "f"
37 PASS attrNode.value is "f"
39 12. Chnaging Attr.value.
40 PASS document.getElementById("i") is null
41 PASS document.getElementById("hi") is document.body
42 PASS document.body.id is "hi"
43 PASS document.body.getAttribute("id") is "hi"
44 PASS attrNode.value is "hi"
46 21. Remove an Attr node.
47 PASS document.body.id is ""
48 PASS document.getElementById("mn") is null
49 PASS document.body.getAttribute("id") is null
50 PASS document.body.getAttributeNode("id") is null
53 PASS document.getElementById("o") is document.body
54 PASS document.body.id is "o"
55 PASS document.body.getAttribute("id") is "o"
57 23. Add an Attr node over an existing one.
58 PASS document.getElementById("o") is null
59 PASS document.getElementById("p") is document.body
60 PASS document.body.id is "p"
61 PASS document.body.getAttribute("id") is "p"
62 PASS successfullyParsed is true