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

Unified Diff: LayoutTests/fast/dynamic/insertAdjacentElement.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
« no previous file with comments | « no previous file | LayoutTests/fast/dynamic/insertAdjacentElement-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dynamic/insertAdjacentElement.html
diff --git a/LayoutTests/fast/dynamic/insertAdjacentElement.html b/LayoutTests/fast/dynamic/insertAdjacentElement.html
index 6932af37ff4c2fbc129d2cd62590e35e38aa4815..c3d0bed3d4865b29fd14d2cf894a00efe82e10b6 100644
--- a/LayoutTests/fast/dynamic/insertAdjacentElement.html
+++ b/LayoutTests/fast/dynamic/insertAdjacentElement.html
@@ -34,8 +34,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;
@@ -43,17 +44,25 @@
// 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").insertAdjacentElement("blah", document.getElementById("1"));
- });
- passes = passes & assertThrows(function() {
- // should throw NOT_SUPPORTED_ERR
+ }) && passes;
+ passes = assertThrows(function() {
+ // should throw TypeError
document.getElementById("container").insertAdjacentElement("beforeEnd", null);
- });
+ }) && passes;
+ passes = assertThrows(function() {
+ // should throw TypeError
+ document.getElementById("container").insertAdjacentElement("beforeEnd");
+ }) && passes;
+ passes = assertThrows(function() {
+ // should throw TypeError
+ document.getElementById("container").insertAdjacentElement();
+ }) && passes;
var elt = document.createElement("div");
- passes = passes & (elt.insertAdjacentElement("beforeBegin", document.createElement("p")) == null);
+ passes = passes && (elt.insertAdjacentElement("beforeBegin", document.createElement("p")) == null);
if (passes) {
document.getElementById("status").style.color = "green";
document.getElementById("status").innerHTML = "<br><br>PASS";
« no previous file with comments | « no previous file | LayoutTests/fast/dynamic/insertAdjacentElement-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698