Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: LayoutTests/fast/dynamic/insertAdjacentHTML.html

Issue 110383002: Throw DOM exception in insertAdjacentHTML if context becomes null (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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";

Powered by Google App Engine
This is Rietveld 408576698