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

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: Simplify test case 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..908cbbb98f204b82287f5af892f8e09cf8e4b2e2
--- /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>
arv (Not doing code reviews) 2013/08/15 14:05:44 I really wish we would use the testharness.js for
+</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");
+shouldBeUndefined("testEvent.deltaZ"); // Not supported yet.
+shouldBe("testEvent.deltaMode", "WheelEvent.DOM_DELTA_PIXEL");
+
+shouldNotThrow("testEvent = new WheelEvent('wheel', { deltaX: 10, deltaY: 20, deltaMode: WheelEvent.DOM_DELTA_PAGE })");
+shouldBe("testEvent.__proto__", "WheelEvent.prototype");
+shouldBe("testEvent.deltaX", "10");
+shouldBe("testEvent.deltaY", "20");
+shouldBeUndefined("testEvent.deltaZ"); // Not supported yet.
+shouldBe("testEvent.deltaMode", "WheelEvent.DOM_DELTA_PAGE");
+
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698