| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script> | 3 <script> |
| 4 if (window.layoutTestController) | 4 if (window.layoutTestController) |
| 5 layoutTestController.dumpAsText(); | 5 layoutTestController.dumpAsText(); |
| 6 | 6 |
| 7 function test() { | 7 function test() { |
| 8 var div = document.getElementById("testdiv"); | 8 var div = document.getElementById("testdiv"); |
| 9 var img = document.createElement("img"); | 9 var img = document.createElement("img"); |
| 10 img.id = "testimg"; | 10 img.id = "testimg"; |
| 11 div.appendChild(img); | 11 div.appendChild(img); |
| 12 div.innerHTML = ""; | 12 div.innerHTML = ""; |
| 13 if ("testimg" in document) | 13 if ("testimg" in document) |
| 14 div.innerText = "FAIL: named item was not removed"; | 14 div.innerText = "FAIL: named item was not removed"; |
| 15 else | 15 else |
| 16 div.innerText = "PASS"; | 16 div.innerText = "PASS"; |
| 17 } | 17 } |
| 18 </script> | 18 </script> |
| 19 </head> | 19 </head> |
| 20 <body onload="test()"> | 20 <body onload="test()"> |
| 21 <p> | 21 <p> |
| 22 Tests that the named item created for an image with an ID is correctly removed. | 22 Tests that the named item created for an image with an ID is correctly removed. |
| 23 The test passes, if you see a "PASS" message in the div below. | 23 The test passes, if you see a "PASS" message in the div below. |
| 24 </p> | 24 </p> |
| 25 <div id="testdiv"></div> | 25 <div id="testdiv"></div> |
| 26 </body> | 26 </body> |
| 27 </html> | 27 </html> |
| 28 | 28 |
| OLD | NEW |