| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>Test that Node.appendChild throws TypeError when a wrong type of argument is passed.</title> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| </head> |
| <body> |
| <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'}) }) |
| }) |
| </script> |
| </body> |
| </html> |