| OLD | NEW |
| 1 CONSOLE WARNING: 'Attr.nodeValue' is deprecated. Please use 'value' instead. |
| 1 Test that different ways of changing an element's id all work properly. | 2 Test that different ways of changing an element's id all work properly. |
| 2 | 3 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 4 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 | 5 |
| 5 | 6 |
| 6 | 7 |
| 7 1. Check id after parsing. | 8 1. Check id after parsing. |
| 8 PASS document.getElementById("a") is document.body | 9 PASS document.getElementById("a") is document.body |
| 9 PASS document.body.id is "a" | 10 PASS document.body.id is "a" |
| 10 PASS document.body.getAttributeNode("id").textContent is "a" | 11 PASS document.body.getAttributeNode("id").value is "a" |
| 11 | 12 |
| 12 2. Change Attr.value. | 13 2. Change Attr.value. |
| 13 PASS document.getElementById("a") is null | 14 PASS document.getElementById("a") is null |
| 14 PASS document.getElementById("b") is document.body | 15 PASS document.getElementById("b") is document.body |
| 15 PASS document.body.getAttributeNode("id").textContent is "b" | 16 PASS document.body.getAttributeNode("id").value is "b" |
| 16 | 17 |
| 17 3. Change HTMLElement.id. | 18 3. Change HTMLElement.id. |
| 18 PASS document.getElementById("b") is null | 19 PASS document.getElementById("b") is null |
| 19 PASS document.getElementById("c") is document.body | 20 PASS document.getElementById("c") is document.body |
| 20 PASS document.body.getAttributeNode("id").textContent is "c" | 21 PASS document.body.getAttributeNode("id").value is "c" |
| 21 | 22 |
| 22 4. Change id attribute via setAttribute(). | 23 4. Change id attribute via setAttribute(). |
| 23 PASS document.getElementById("c") is null | 24 PASS document.getElementById("c") is null |
| 24 PASS document.getElementById("d") is document.body | 25 PASS document.getElementById("d") is document.body |
| 25 PASS document.body.getAttributeNode("id").textContent is "d" | 26 PASS document.body.getAttributeNode("id").value is "d" |
| 26 | 27 |
| 27 5. Change id attribute via setAttributeNS(). | 28 5. Change id attribute via setAttributeNS(). |
| 28 PASS document.getElementById("d") is null | 29 PASS document.getElementById("d") is null |
| 29 PASS document.getElementById("e") is document.body | 30 PASS document.getElementById("e") is document.body |
| 30 PASS document.body.getAttributeNode("id").textContent is "e" | 31 PASS document.body.getAttributeNode("id").value is "e" |
| 31 | 32 |
| 32 6. Change Attr.nodeValue. | 33 6. Change Attr.nodeValue. |
| 33 PASS document.getElementById("e") is null | 34 PASS document.getElementById("e") is null |
| 34 PASS document.getElementById("f") is document.body | 35 PASS document.getElementById("f") is document.body |
| 35 PASS document.body.id is "f" | 36 PASS document.body.id is "f" |
| 36 PASS document.body.getAttribute("id") is "f" | 37 PASS document.body.getAttribute("id") is "f" |
| 37 PASS attrNode.textContent is "f" | 38 PASS attrNode.value is "f" |
| 38 PASS attrNode.childNodes.length is 1 | 39 PASS attrNode.childNodes.length is 1 |
| 39 | 40 |
| 40 7. Attr.replaceChild(). | 41 7. Attr.replaceChild(). |
| 41 PASS document.getElementById("f") is null | 42 PASS document.getElementById("f") is null |
| 42 PASS document.getElementById("g") is document.body | 43 PASS document.getElementById("g") is document.body |
| 43 PASS document.body.id is "g" | 44 PASS document.body.id is "g" |
| 44 PASS document.body.getAttribute("id") is "g" | 45 PASS document.body.getAttribute("id") is "g" |
| 45 PASS attrNode.textContent is "g" | 46 PASS attrNode.value is "g" |
| 46 PASS attrNode.childNodes.length is 1 | 47 PASS attrNode.childNodes.length is 1 |
| 47 | 48 |
| 48 8. Attr.insertBefore(). | 49 8. Attr.insertBefore(). |
| 49 PASS document.getElementById("g") is null | 50 PASS document.getElementById("g") is null |
| 50 PASS document.getElementById("0g") is document.body | 51 PASS document.getElementById("0g") is document.body |
| 51 PASS document.body.id is "0g" | 52 PASS document.body.id is "0g" |
| 52 PASS document.body.getAttribute("id") is "0g" | 53 PASS document.body.getAttribute("id") is "0g" |
| 53 PASS attrNode.textContent is "0g" | 54 PASS attrNode.value is "0g" |
| 54 PASS attrNode.childNodes.length is 2 | 55 PASS attrNode.childNodes.length is 2 |
| 55 | 56 |
| 56 9. attr.appendChild(). | 57 9. attr.appendChild(). |
| 57 PASS document.getElementById("0g") is null | 58 PASS document.getElementById("0g") is null |
| 58 PASS document.getElementById("0g2") is document.body | 59 PASS document.getElementById("0g2") is document.body |
| 59 PASS document.body.id is "0g2" | 60 PASS document.body.id is "0g2" |
| 60 PASS document.body.getAttribute("id") is "0g2" | 61 PASS document.body.getAttribute("id") is "0g2" |
| 61 PASS attrNode.textContent is "0g2" | 62 PASS attrNode.value is "0g2" |
| 62 PASS attrNode.childNodes.length is 3 | 63 PASS attrNode.childNodes.length is 3 |
| 63 | 64 |
| 64 10. Attr.removeChild() | 65 10. Attr.removeChild() |
| 65 PASS document.body.getAttributeNode("id").childNodes.length is 0 | 66 PASS document.body.getAttributeNode("id").childNodes.length is 0 |
| 66 PASS document.getElementById("h") is null | 67 PASS document.getElementById("h") is null |
| 67 PASS document.getElementById("") is null | 68 PASS document.getElementById("") is null |
| 68 PASS document.body.id is "" | 69 PASS document.body.id is "" |
| 69 PASS document.body.getAttribute("id") is "" | 70 PASS document.body.getAttribute("id") is "" |
| 70 PASS document.body.getAttributeNode("id").textContent is "" | 71 PASS document.body.getAttributeNode("id").value is "" |
| 71 | 72 |
| 72 11. Changing Text.nodeValue. | 73 11. Changing Text.nodeValue. |
| 73 PASS attrNode.firstChild.nodeValue is "i" | 74 PASS attrNode.firstChild.nodeValue is "i" |
| 74 PASS document.getElementById("i") is document.body | 75 PASS document.getElementById("i") is document.body |
| 75 PASS document.body.id is "i" | 76 PASS document.body.id is "i" |
| 76 PASS document.body.getAttribute("id") is "i" | 77 PASS document.body.getAttribute("id") is "i" |
| 77 PASS attrNode.textContent is "i" | 78 PASS attrNode.value is "i" |
| 78 PASS attrNode.childNodes.length is 1 | 79 PASS attrNode.childNodes.length is 1 |
| 79 | 80 |
| 80 12. Chnaging Attr.textContent. | 81 12. Chnaging Attr.value. |
| 81 PASS document.getElementById("i") is null | 82 PASS document.getElementById("i") is null |
| 82 PASS document.getElementById("hi") is document.body | 83 PASS document.getElementById("hi") is document.body |
| 83 PASS document.body.id is "hi" | 84 PASS document.body.id is "hi" |
| 84 PASS document.body.getAttribute("id") is "hi" | 85 PASS document.body.getAttribute("id") is "hi" |
| 85 PASS attrNode.textContent is "hi" | 86 PASS attrNode.value is "hi" |
| 86 PASS attrNode.childNodes.length is 1 | 87 PASS attrNode.childNodes.length is 1 |
| 87 | 88 |
| 88 13. Text.splitText(). | 89 13. Text.splitText(). |
| 89 PASS document.getElementById("hi") is document.body | 90 PASS document.getElementById("hi") is document.body |
| 90 PASS document.body.id is "hi" | 91 PASS document.body.id is "hi" |
| 91 PASS document.body.getAttribute("id") is "hi" | 92 PASS document.body.getAttribute("id") is "hi" |
| 92 PASS document.body.getAttributeNode("id").textContent is "hi" | 93 PASS document.body.getAttributeNode("id").value is "hi" |
| 93 PASS document.body.getAttributeNode("id").childNodes.length is 2 | 94 PASS document.body.getAttributeNode("id").childNodes.length is 2 |
| 94 | 95 |
| 95 14. Node.normalize(), joining text nodes. | 96 14. Node.normalize(), joining text nodes. |
| 96 PASS document.getElementById("hi") is document.body | 97 PASS document.getElementById("hi") is document.body |
| 97 PASS document.body.id is "hi" | 98 PASS document.body.id is "hi" |
| 98 PASS document.body.getAttribute("id") is "hi" | 99 PASS document.body.getAttribute("id") is "hi" |
| 99 PASS document.body.getAttributeNode("id").textContent is "hi" | 100 PASS document.body.getAttributeNode("id").value is "hi" |
| 100 PASS document.body.getAttributeNode("id").childNodes.length is 1 | 101 PASS document.body.getAttributeNode("id").childNodes.length is 1 |
| 101 | 102 |
| 102 15. Changing Attr.nodeValue. | 103 15. Changing Attr.nodeValue. |
| 103 PASS document.getElementById("hi") is null | 104 PASS document.getElementById("hi") is null |
| 104 PASS document.getElementById("j") is document.body | 105 PASS document.getElementById("j") is document.body |
| 105 PASS document.body.id is "j" | 106 PASS document.body.id is "j" |
| 106 PASS document.body.getAttribute("id") is "j" | 107 PASS document.body.getAttribute("id") is "j" |
| 107 PASS attrNode.textContent is "j" | 108 PASS attrNode.value is "j" |
| 108 PASS attrNode.childNodes.length is 1 | 109 PASS attrNode.childNodes.length is 1 |
| 109 | 110 |
| 110 16. Changing Text.data. | 111 16. Changing Text.data. |
| 111 PASS document.getElementById("j") is null | 112 PASS document.getElementById("j") is null |
| 112 PASS document.getElementById("k") is document.body | 113 PASS document.getElementById("k") is document.body |
| 113 PASS document.body.id is "k" | 114 PASS document.body.id is "k" |
| 114 PASS document.body.getAttribute("id") is "k" | 115 PASS document.body.getAttribute("id") is "k" |
| 115 PASS attrNode.textContent is "k" | 116 PASS attrNode.value is "k" |
| 116 PASS attrNode.childNodes.length is 1 | 117 PASS attrNode.childNodes.length is 1 |
| 117 | 118 |
| 118 17. Changing text child with appendData(). | 119 17. Changing text child with appendData(). |
| 119 PASS document.getElementById("k") is null | 120 PASS document.getElementById("k") is null |
| 120 PASS document.getElementById("kl") is document.body | 121 PASS document.getElementById("kl") is document.body |
| 121 PASS document.body.id is "kl" | 122 PASS document.body.id is "kl" |
| 122 PASS document.body.getAttribute("id") is "kl" | 123 PASS document.body.getAttribute("id") is "kl" |
| 123 PASS attrNode.textContent is "kl" | 124 PASS attrNode.value is "kl" |
| 124 PASS attrNode.childNodes.length is 1 | 125 PASS attrNode.childNodes.length is 1 |
| 125 | 126 |
| 126 18. Changing text child with insertData(). | 127 18. Changing text child with insertData(). |
| 127 PASS document.getElementById("kl") is null | 128 PASS document.getElementById("kl") is null |
| 128 PASS document.getElementById("k1l") is document.body | 129 PASS document.getElementById("k1l") is document.body |
| 129 PASS document.body.id is "k1l" | 130 PASS document.body.id is "k1l" |
| 130 PASS document.body.getAttribute("id") is "k1l" | 131 PASS document.body.getAttribute("id") is "k1l" |
| 131 PASS attrNode.textContent is "k1l" | 132 PASS attrNode.value is "k1l" |
| 132 PASS attrNode.childNodes.length is 1 | 133 PASS attrNode.childNodes.length is 1 |
| 133 | 134 |
| 134 19. Changing text child with deleteData(). | 135 19. Changing text child with deleteData(). |
| 135 PASS document.getElementById("k1l") is null | 136 PASS document.getElementById("k1l") is null |
| 136 PASS document.getElementById("l") is document.body | 137 PASS document.getElementById("l") is document.body |
| 137 PASS document.body.id is "l" | 138 PASS document.body.id is "l" |
| 138 PASS document.body.getAttribute("id") is "l" | 139 PASS document.body.getAttribute("id") is "l" |
| 139 PASS attrNode.textContent is "l" | 140 PASS attrNode.value is "l" |
| 140 PASS attrNode.childNodes.length is 1 | 141 PASS attrNode.childNodes.length is 1 |
| 141 | 142 |
| 142 20. Changing text child with replaceData(). | 143 20. Changing text child with replaceData(). |
| 143 PASS document.getElementById("l") is null | 144 PASS document.getElementById("l") is null |
| 144 PASS document.getElementById("mn") is document.body | 145 PASS document.getElementById("mn") is document.body |
| 145 PASS document.body.id is "mn" | 146 PASS document.body.id is "mn" |
| 146 PASS document.body.getAttribute("id") is "mn" | 147 PASS document.body.getAttribute("id") is "mn" |
| 147 PASS attrNode.textContent is "mn" | 148 PASS attrNode.value is "mn" |
| 148 PASS attrNode.childNodes.length is 1 | 149 PASS attrNode.childNodes.length is 1 |
| 149 | 150 |
| 150 21. Remove an Attr node. | 151 21. Remove an Attr node. |
| 151 PASS document.body.id is "" | 152 PASS document.body.id is "" |
| 152 PASS document.getElementById("mn") is null | 153 PASS document.getElementById("mn") is null |
| 153 PASS document.body.getAttribute("id") is null | 154 PASS document.body.getAttribute("id") is null |
| 154 PASS document.body.getAttributeNode("id") is null | 155 PASS document.body.getAttributeNode("id") is null |
| 155 | 156 |
| 156 22. Add an Attr node. | 157 22. Add an Attr node. |
| 157 PASS document.getElementById("o") is document.body | 158 PASS document.getElementById("o") is document.body |
| 158 PASS document.body.id is "o" | 159 PASS document.body.id is "o" |
| 159 PASS document.body.getAttribute("id") is "o" | 160 PASS document.body.getAttribute("id") is "o" |
| 160 | 161 |
| 161 23. Add an Attr node over an existing one. | 162 23. Add an Attr node over an existing one. |
| 162 PASS document.getElementById("o") is null | 163 PASS document.getElementById("o") is null |
| 163 PASS document.getElementById("p") is document.body | 164 PASS document.getElementById("p") is document.body |
| 164 PASS document.body.id is "p" | 165 PASS document.body.id is "p" |
| 165 PASS document.body.getAttribute("id") is "p" | 166 PASS document.body.getAttribute("id") is "p" |
| 166 PASS successfullyParsed is true | 167 PASS successfullyParsed is true |
| 167 | 168 |
| 168 TEST COMPLETE | 169 TEST COMPLETE |
| 169 | 170 |
| OLD | NEW |