Index: LayoutTests/fast/events/init-message-event.html |
diff --git a/LayoutTests/fast/events/init-message-event.html b/LayoutTests/fast/events/init-message-event.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5ca4f0d94e8402cad99f4822e4c4fdf5f02d6c03 |
--- /dev/null |
+++ b/LayoutTests/fast/events/init-message-event.html |
@@ -0,0 +1,24 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<link rel="help" href="http://www.w3.org/TR/2013/WD-html51-20130528/editing.html#dom-datatransferitemlist-remove"> |
+<script src="../js/resources/js-test-pre.js"></script> |
+</head> |
+<body> |
+<script> |
+description("Checks that initMessageEvent() is working"); |
+ |
+var newEvent; |
+function runTest() { |
+ newEvent = document.createEvent("MessageEvent"); |
+ shouldThrow('newEvent.initMessageEvent("message", true, true, "ff", "*", 43, window, {x:1});', '"TypeError: 8th argument is neither an array, nor does it have indexed properties."'); |
+ shouldNotThrow('newEvent.initMessageEvent("message", true, true, "ff", "*", 43, window, null)'); |
+ shouldBeType(newEvent, MessageEvent); |
+} |
+ |
+runTest(); |
+</script> |
+<script src="../js/resources/js-test-post.js"></script> |
+</body> |
+</html> |
+ |