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

Unified Diff: LayoutTests/fast/dynamic/insertAdjacentText.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/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";
« no previous file with comments | « LayoutTests/fast/dynamic/insertAdjacentHTML.html ('k') | LayoutTests/fast/dynamic/insertAdjacentText-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698