OLD | NEW |
1 <body> | 1 <body> |
2 <pre id="error-log"></pre> | 2 <pre id="error-log"></pre> |
3 <span id="container" style="color: green"> | 3 <span id="container" style="color: green"> |
4 </span> | 4 </span> |
5 <span id="status" style="color: red"> | 5 <span id="status" style="color: red"> |
6 FAILURE | 6 FAILURE |
7 </span> | 7 </span> |
8 </body> | 8 </body> |
9 <script> | 9 <script> |
10 if (window.testRunner) | 10 if (window.testRunner) |
(...skipping 22 matching lines...) Loading... |
33 passes = assertThrows(function() { | 33 passes = assertThrows(function() { |
34 // should throw TYPE_MISMATCH_ERR | 34 // should throw TYPE_MISMATCH_ERR |
35 document.getElementById("container").insertAdjacentHTML("blah", "<span>htm
l</span>"); | 35 document.getElementById("container").insertAdjacentHTML("blah", "<span>htm
l</span>"); |
36 }) && passes; | 36 }) && passes; |
37 | 37 |
38 passes = assertThrows(function() { | 38 passes = assertThrows(function() { |
39 // Should throw NoModificationAllowedError. | 39 // Should throw NoModificationAllowedError. |
40 document.createElement('div').insertAdjacentHTML("afterEnd", "<span>html</
span>"); | 40 document.createElement('div').insertAdjacentHTML("afterEnd", "<span>html</
span>"); |
41 }) && passes; | 41 }) && passes; |
42 | 42 |
| 43 passes = assertThrows(function() { |
| 44 document.getElementById("container").insertAdjacentHTML(); |
| 45 }) && passes; |
| 46 |
| 47 passes = assertThrows(function() { |
| 48 document.getElementById("container").insertAdjacentHTML("beforeBegin"); |
| 49 }) && passes; |
| 50 |
43 if (passes) { | 51 if (passes) { |
44 document.getElementById("status").style.color = "green"; | 52 document.getElementById("status").style.color = "green"; |
45 document.getElementById("status").innerHTML = "<br><br>PASS"; | 53 document.getElementById("status").innerHTML = "<br><br>PASS"; |
46 } | 54 } |
47 </script> | 55 </script> |
OLD | NEW |