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

Unified Diff: LayoutTests/fast/events/uievent-with-inputdevice.html

Issue 1182313006: Populates sourceDevice attribute into KeyboardEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 6 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
Index: LayoutTests/fast/events/uievent-with-inputdevice.html
diff --git a/LayoutTests/fast/events/uievent-with-inputdevice.html b/LayoutTests/fast/events/uievent-with-inputdevice.html
index e2b760d97ca41e597384ba21a9c956f6d150147f..5db606aa2c7792aac303c9093fade93824e9ca96 100644
--- a/LayoutTests/fast/events/uievent-with-inputdevice.html
+++ b/LayoutTests/fast/events/uievent-with-inputdevice.html
@@ -29,4 +29,14 @@
shouldBeNonNull("mouseevent.sourceDevice");
shouldBeFalse("mouseevent.sourceDevice.firesTouchEvents");
+
+ // Creating KeyboardEvent.
+ var keyboardevent = new KeyboardEvent("keydown");
+ shouldBeNonNull("keyboardevent");
+ shouldBeNull("keyboardevent.sourceDevice");
+
+ keyboardevent = new KeyboardEvent("keydown", { sourceDevice: new InputDevice({ firesTouchEvents: false }) });
+ shouldBeNonNull("keyboardevent.sourceDevice");
+ shouldBeFalse("keyboardevent.sourceDevice.firesTouchEvents");
+
</script>

Powered by Google App Engine
This is Rietveld 408576698