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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/constructors/input-event-constructor.html

Issue 1682683002: [InputEvent] Add InputEvent with basic interface behind a flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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 | third_party/WebKit/LayoutTests/fast/events/inputevents/input-event-event-listener.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/inputevents/input-event-event-listener.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698