Index: third_party/WebKit/LayoutTests/fast/events/init-event-exceptions.html |
diff --git a/third_party/WebKit/LayoutTests/fast/events/init-event-exceptions.html b/third_party/WebKit/LayoutTests/fast/events/init-event-exceptions.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..39ae89fa4addb7dd58f55700a16fbd33043ab747 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/events/init-event-exceptions.html |
@@ -0,0 +1,12 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/js-test.js"></script> |
+<script> |
+description("Tests the type checking of init*Event() methods."); |
+shouldThrow("document.createEvent('CompositionEvent').initCompositionEvent('', false, false, {}, '')"); |
+shouldThrow("document.createEvent('KeyboardEvent').initKeyboardEvent('', false, false, {}, '', 0, false, false, false, false)"); |
+shouldThrow("document.createEvent('MouseEvent').initMouseEvent('', false, false, null, 0, 0, 0, 0, 0, false, false, false, false, 0, {})"); |
+shouldThrow("document.createEvent('MouseEvent').initMouseEvent('', false, false, {}, 0, 0, 0, 0, 0, false, false, false, false, 0, null)"); |
+shouldThrow("document.createEvent('MutationEvent').initMutationEvent('', false, false, {}, '', '', '', 0)"); |
+shouldThrow("document.createEvent('TextEvent').initTextEvent('', false, false, {}, '')"); |
+shouldThrow("document.createEvent('UIEvent').initUIEvent('', false, false, {}, 0)"); |
+</script> |