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

Unified Diff: LayoutTests/fast/events/keyboardevent-location-constants.html

Issue 20986003: Define DOM_KEY_LOCATION_* constants on KeyboardEvent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 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/keyboardevent-location-constants.html
diff --git a/LayoutTests/fast/events/keyboardevent-location-constants.html b/LayoutTests/fast/events/keyboardevent-location-constants.html
new file mode 100644
index 0000000000000000000000000000000000000000..fc714ab2886b272902328eb3e205839f7500e5a4
--- /dev/null
+++ b/LayoutTests/fast/events/keyboardevent-location-constants.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="help" href="http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent" />
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+description("Tests that the DOM_KEY_LOCATION_* constants are defined on KeyboardEvent");
+
+shouldBe('KeyboardEvent.DOM_KEY_LOCATION_STANDARD', '0x00');
+shouldBe('KeyboardEvent.DOM_KEY_LOCATION_LEFT', '0x01');
+shouldBe('KeyboardEvent.DOM_KEY_LOCATION_RIGHT', '0x02');
+shouldBe('KeyboardEvent.DOM_KEY_LOCATION_NUMPAD', '0x03');
+// These constants are not yet supported (crbug.com/265446)
+shouldBeUndefined('KeyboardEvent.DOM_KEY_LOCATION_MOBILE');
+shouldBeUndefined('KeyboardEvent.DOM_KEY_LOCATION_JOYSTICK');
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698