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

Unified Diff: LayoutTests/fast/events/wheelevent-constructor.html

Issue 22859012: Add support for DOM Level 3 WheelEvent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename prefixedType() to legacyType() Created 7 years, 4 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/wheelevent-constructor.html
diff --git a/LayoutTests/fast/events/wheelevent-constructor.html b/LayoutTests/fast/events/wheelevent-constructor.html
new file mode 100644
index 0000000000000000000000000000000000000000..2eb7b1885127c024f5dc0262c7cf3eb29e609024
--- /dev/null
+++ b/LayoutTests/fast/events/wheelevent-constructor.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="help" href="http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+description("Tests the constructor of the standard wheel event");
+
+var testEvent;
+shouldNotThrow("testEvent = new WheelEvent('wheel')");
+shouldBe("testEvent.__proto__", "WheelEvent.prototype");
+shouldBe("testEvent.deltaX", "0");
+shouldBe("testEvent.deltaY", "0");
+shouldBe("testEvent.deltaZ", "0");
+shouldBe("testEvent.deltaMode", "WheelEvent.DOM_DELTA_PIXEL");
+
+shouldNotThrow("testEvent = new WheelEvent('wheel', { deltaX: 10.2, deltaY: 20.3, deltaZ: 30.4, deltaMode: WheelEvent.DOM_DELTA_PAGE })");
+shouldBe("testEvent.__proto__", "WheelEvent.prototype");
+shouldBe("testEvent.deltaX", "10.2");
+shouldBe("testEvent.deltaY", "20.3");
+shouldBe("testEvent.deltaZ", "30.4");
+shouldBe("testEvent.deltaMode", "WheelEvent.DOM_DELTA_PAGE");
+
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
« no previous file with comments | « LayoutTests/fast/events/wheelevent-basic-expected.txt ('k') | LayoutTests/fast/events/wheelevent-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698