Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / svg / dom / document-createEvent-mandatory-arg.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 description("Tests that Document.createEvent() throws for SVG Documents when given no argument.");
9
10 var svgDoc = document.implementation.createDocument("http://www.w3.org/2000/svg", "svg", null);
11 shouldBe("svgDoc.__proto__", "XMLDocument.prototype");
12 shouldBe("svgDoc.__proto__.__proto__", "Document.prototype");
13 shouldThrow("svgDoc.createEvent()", '"TypeError: Failed to execute \'createEvent\' on \'Document\': 1 argument required, but only 0 present."');
14 shouldNotThrow("svgDoc.createEvent('MouseEvents')");
15 </script>
16 </body>
17 </html>