Index: LayoutTests/fast/dom/Node/append-child-error.html |
diff --git a/LayoutTests/fast/dom/Node/append-child-error.html b/LayoutTests/fast/dom/Node/append-child-error.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..863e165159facec9671db717cdc9700257ad2bf9 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/Node/append-child-error.html |
@@ -0,0 +1,17 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+</head> |
+<body> |
+This test case verifies if relevant TypeError is thrown when invalid Node argument is given. |
+<script> |
+test(function() { |
+ assert_throws(new TypeError(), function() { document.body.appendChild() }) |
+ assert_throws(new TypeError(), function() { document.body.appendChild(null) }) |
+ assert_throws(new TypeError(), function() { document.body.appendChild({'a':'b'}) }) |
+}, "Node.appendChild should throw TypeError when a wrong type of argument is passed.") |
+</script> |
+</body> |
+</html> |