Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / documentElement-null.html
bloba693820a036fe8cc6bf9a2dc59150f1db016361b
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
2 <html>
3 <head>
4 <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
5 <title>Weee!</title>
6 <script>
7 window.onload = function() {
8 if (window.testRunner)
9 window.testRunner.dumpAsText();
11 var meths = [
12 document.lookupNamespaceURI,
13 document.isDefaultNamespace,
14 function(node) { this.body = node },
15 document.lookupPrefix
18 var node = document.createElement('b');
20 // Empty the document
21 while (document.firstChild)
22 document.removeChild(document.firstChild);
24 for (var i = 0, il = meths.length; i < il; ++i) {
25 try {
26 // Some expect nodes, some expect strings, but our nodes will get
27 // toString'd so we should be ok on both.
28 meths[i].call(document, node, node, node);
29 } catch(e) { }
32 document.open();
33 document.write('PASS');
34 document.close();
36 </script>
37 </head>
38 <body>
40 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=19470">bug 19470</a>:
41 Null pointer dereferences on a document with no documentElement.</p>
42 <p>On success, should print PASS.</p>
44 </body>
45 </html>