Index: third_party/WebKit/LayoutTests/fast/events/constructors/input-event-constructor.html |
diff --git a/third_party/WebKit/LayoutTests/fast/events/constructors/input-event-constructor.html b/third_party/WebKit/LayoutTests/fast/events/constructors/input-event-constructor.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..aa08a98c0e908086da5fe52b0cdc8a40d54ebff8 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/events/constructors/input-event-constructor.html |
@@ -0,0 +1,26 @@ |
+<!DOCTYPE html> |
+<title>InputEvent: Constructor test</title> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<div id="log"></div> |
+<script> |
+test(function() { |
+ assert_throws({name: 'TypeError'}, |
+ function() { new InputEvent(); }, |
+ "Construct InputEvent with no argument."); |
+}, "Checks for InputEvent constructor with not enough argument"); |
+ |
+test(function() { |
+ var e = new InputEvent('beforeinput'); |
+ assert_true(e instanceof InputEvent); |
+ assert_equals(e.type, 'beforeinput'); |
+ assert_equals(e.bubbles, false); |
+}, "Checks for InputEvent constructor with one argument"); |
+ |
+test(function() { |
+ var e = new InputEvent('input', {'bubbles': true}); |
+ assert_true(e instanceof InputEvent); |
+ assert_equals(e.type, 'input'); |
+ assert_equals(e.bubbles, true); |
+}, "Checks for InputEvent constructor with full arguments"); |
+</script> |