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