| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body id="a"> | 6 <body id="a"> |
| 7 <script> | 7 <script> |
| 8 | 8 |
| 9 description("Test that different ways of changing an element's id all work prope
rly."); | 9 description("Test that different ways of changing an element's id all work prope
rly."); |
| 10 | 10 |
| 11 debug("\n1. Check id after parsing."); | 11 debug("\n1. Check id after parsing."); |
| 12 shouldBe('document.getElementById("a")', 'document.body'); | 12 shouldBe('document.getElementById("a")', 'document.body'); |
| 13 shouldBe('document.body.id', '"a"'); | 13 shouldBe('document.body.id', '"a"'); |
| 14 shouldBe('document.body.getAttributeNode("id").value', '"a"'); | 14 shouldBe('document.body.getAttributeNode("id").value', '"a"'); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 var attrNode = document.createAttribute("id"); | 74 var attrNode = document.createAttribute("id"); |
| 75 attrNode.value = "p"; | 75 attrNode.value = "p"; |
| 76 document.body.setAttributeNode(attrNode); | 76 document.body.setAttributeNode(attrNode); |
| 77 shouldBe('document.getElementById("o")', 'null'); | 77 shouldBe('document.getElementById("o")', 'null'); |
| 78 shouldBe('document.getElementById("p")', 'document.body'); | 78 shouldBe('document.getElementById("p")', 'document.body'); |
| 79 shouldBe('document.body.id', '"p"'); | 79 shouldBe('document.body.id', '"p"'); |
| 80 shouldBe('document.body.getAttribute("id")', '"p"'); | 80 shouldBe('document.body.getAttribute("id")', '"p"'); |
| 81 </script> | 81 </script> |
| 82 </body> | 82 </body> |
| 83 </html> | 83 </html> |
| OLD | NEW |