Index: third_party/WebKit/LayoutTests/imported/wpt/uievents/constructors/inputevent-constructor.html |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/uievents/constructors/inputevent-constructor.html b/third_party/WebKit/LayoutTests/imported/wpt/uievents/constructors/inputevent-constructor.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f1f5641785eb8d61b872f187782e90c1ea76ec02 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/uievents/constructors/inputevent-constructor.html |
@@ -0,0 +1,25 @@ |
+<!DOCTYPE html> |
+<title>InputEvent Constructor Tests</title> |
+<script src="/resources/testharness.js"></script> |
+<script src="/resources/testharnessreport.js"></script> |
+<script> |
+test(function() { |
+ var e = new InputEvent('type'); |
+ assert_equals(e.data, null); |
+ assert_false(e.isComposing); |
+}, 'InputEvent constructor without InputEventInit.'); |
+ |
+test(function() { |
+ var e = new InputEvent('type', { data: null, isComposing: true }); |
+ assert_equals(e.data, null); |
+ assert_true(e.isComposing); |
+}, 'InputEvent construtor with InputEventInit where data is null'); |
+ |
+test(function() { |
+ assert_equals(new InputEvent('type', { data: ''}).data, ''); |
+}, 'InputEvent construtor with InputEventInit where data is empty string'); |
+ |
+test(function() { |
+ assert_equals(new InputEvent('type', { data: 'data' }).data, 'data'); |
+}, 'InputEvent construtor with InputEventInit where data is non empty string'); |
+</script> |