Index: LayoutTests/fast/dynamic/insertAdjacentText.html |
diff --git a/LayoutTests/fast/dynamic/insertAdjacentText.html b/LayoutTests/fast/dynamic/insertAdjacentText.html |
index a8b9ab60127c3341210e38c1ec3891bbe73e32ff..60c3e2523efeb75e60d6034101d88f3c81ff4125 100644 |
--- a/LayoutTests/fast/dynamic/insertAdjacentText.html |
+++ b/LayoutTests/fast/dynamic/insertAdjacentText.html |
@@ -20,8 +20,9 @@ |
var testPassed = false; |
try { |
func(); |
+ document.getElementById("error-log").textContent += "Expected exception missing.\n"; |
} catch (e) { |
- document.getElementById("error-log").innerHTML += "Caught expected exception: " + e + "\n"; |
+ document.getElementById("error-log").textContent += "Caught expected exception: " + e + "\n"; |
testPassed = true; |
} |
return testPassed; |
@@ -29,10 +30,20 @@ |
// check that exceptions are thrown as required |
var passes = true; |
- passes = passes & assertThrows(function() { |
- // should throw TYPE_MISMATCH_ERR |
+ passes = assertThrows(function() { |
+ // should throw SyntaxError |
document.getElementById("container").insertAdjacentText("blah", "text"); |
- }); |
+ }) && passes; |
+ |
+ passes = assertThrows(function() { |
+ // should throw TypeError |
+ document.getElementById("container").insertAdjacentText(); |
+ }) && passes; |
+ |
+ passes = assertThrows(function() { |
+ // should throw TypeError |
+ document.getElementById("container").insertAdjacentText("afterBegin"); |
+ }) && passes; |
if (passes) { |
document.getElementById("status").style.color = "green"; |