| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../resources/js-test.js"></script> |
| </head> |
| <body> |
| <script> |
| description("Tests that Document.createEvent() throws for SVG Documents when given no argument."); |
| |
| var svgDoc = document.implementation.createDocument("http://www.w3.org/2000/svg", "svg", null); |
| shouldBe("svgDoc.__proto__", "XMLDocument.prototype"); |
| shouldBe("svgDoc.__proto__.__proto__", "Document.prototype"); |
| shouldThrow("svgDoc.createEvent()", '"TypeError: Failed to execute \'createEvent\' on \'Document\': 1 argument required, but only 0 present."'); |
| shouldNotThrow("svgDoc.createEvent('MouseEvents')"); |
| </script> |
| </body> |
| </html> |