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

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

Issue 146313006: Make arguments to insertAdjacent{Text,Element} non-optional (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months 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 52b13b6faa9ec43b030e85198d16e28520f9a13c..96496ff6e5e33fb4034b8261ff9805cb9177c81b 100644
--- a/LayoutTests/fast/dynamic/insertAdjacentHTML.html
+++ b/LayoutTests/fast/dynamic/insertAdjacentHTML.html
@@ -20,9 +20,9 @@ if (window.testRunner)
var testPassed = false;
try {
func();
- document.getElementById("error-log").innerHTML += "Expected exception missing.\n";
+ 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;
@@ -31,21 +31,20 @@ if (window.testRunner)
// check that exceptions are thrown as required
var passes = true;
passes = assertThrows(function() {
- // should throw TYPE_MISMATCH_ERR
+ // should throw SyntaxError
document.getElementById("container").insertAdjacentHTML("blah", "<span>html</span>");
}) && passes;
-
passes = assertThrows(function() {
- // Should throw NoModificationAllowedError.
+ // Should throw NoModificationAllowedError
document.createElement('div').insertAdjacentHTML("afterEnd", "<span>html</span>");
}) && passes;
-
passes = assertThrows(function() {
- document.getElementById("container").insertAdjacentHTML();
+ // Should throw TypeError
+ document.getElementById("container").insertAdjacentHTML();
}) && passes;
-
passes = assertThrows(function() {
- document.getElementById("container").insertAdjacentHTML("beforeBegin");
+ // Should throw TypeError
+ document.getElementById("container").insertAdjacentHTML("beforeBegin");
}) && passes;
if (passes) {
« no previous file with comments | « LayoutTests/fast/dynamic/insertAdjacentElement-expected.txt ('k') | LayoutTests/fast/dynamic/insertAdjacentText.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698