Index: LayoutTests/fast/dynamic/insertAdjacentHTML.html |
diff --git a/LayoutTests/fast/dynamic/insertAdjacentHTML.html b/LayoutTests/fast/dynamic/insertAdjacentHTML.html |
index 3e3ffe66cdee24891ba637520e4e929c55a33662..7013597ab21636af300a059b5308ddfe92dab86a 100644 |
--- a/LayoutTests/fast/dynamic/insertAdjacentHTML.html |
+++ b/LayoutTests/fast/dynamic/insertAdjacentHTML.html |
@@ -20,6 +20,7 @@ if (window.testRunner) |
var testPassed = false; |
try { |
func(); |
+ document.getElementById("error-log").innerHTML += "Expected exception missing.\n"; |
} catch (e) { |
document.getElementById("error-log").innerHTML += "Caught expected exception: " + e + "\n"; |
testPassed = true; |
@@ -29,10 +30,15 @@ if (window.testRunner) |
// check that exceptions are thrown as required |
var passes = true; |
- passes = passes & assertThrows(function() { |
+ passes = assertThrows(function() { |
// should throw TYPE_MISMATCH_ERR |
document.getElementById("container").insertAdjacentHTML("blah", "<span>html</span>"); |
- }); |
+ }) && passes; |
+ |
+ passes = assertThrows(function() { |
+ // Should throw NoModificationAllowedError. |
+ document.createElement('div').insertAdjacentHTML("afterEnd", "<span>html</span>"); |
+ }) && passes; |
if (passes) { |
document.getElementById("status").style.color = "green"; |