Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: LayoutTests/svg/dom/document-createEvent-mandatory-arg.html

Issue 254133002: Remove support for Document.createEvent() without argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add layout test Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/svg/dom/document-createEvent-mandatory-arg-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/dom/document-createEvent-mandatory-arg.html
diff --git a/LayoutTests/svg/dom/document-createEvent-mandatory-arg.html b/LayoutTests/svg/dom/document-createEvent-mandatory-arg.html
new file mode 100644
index 0000000000000000000000000000000000000000..415b5e7a84b2a7b0669912bbbf1cb5c9044dfc2e
--- /dev/null
+++ b/LayoutTests/svg/dom/document-createEvent-mandatory-arg.html
@@ -0,0 +1,17 @@
+<!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>
« no previous file with comments | « no previous file | LayoutTests/svg/dom/document-createEvent-mandatory-arg-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698