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

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

Issue 2024243002: Set default width/height of pointer events to 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: third_party/WebKit/LayoutTests/fast/events/constructors/pointer-event-constructor.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/constructors/pointer-event-constructor.html b/third_party/WebKit/LayoutTests/fast/events/constructors/pointer-event-constructor.html
index 620c34c9e2f5198f12f5b22592f1f6ac4cb19502..0b2ae15cfba3f30d9a65c22dfed32f6f3364d7c3 100644
--- a/third_party/WebKit/LayoutTests/fast/events/constructors/pointer-event-constructor.html
+++ b/third_party/WebKit/LayoutTests/fast/events/constructors/pointer-event-constructor.html
@@ -36,7 +36,10 @@ debug("--- tests for intrinsic attributes ---");
["width", "height", "pressure"].forEach(function (attr) {
debug("-- no init --");
- shouldBeZero("new PointerEvent('eventType')." + attr);
+ var defaultValue = 1; // For width and height
+ if (attr == "pressure")
+ defaultValue = 0;
+ shouldBeEqualToNumber("new PointerEvent('eventType')." + attr, defaultValue);
debug("-- init with valid float/double values --");
shouldBeEqualToNumber("new PointerEvent('eventType', { " + attr + ": 123 })." + attr, 123);
@@ -51,7 +54,7 @@ debug("--- tests for intrinsic attributes ---");
shouldThrow("new PointerEvent('eventType', { " + attr + ": 'dummy' })." + attr);
shouldThrow("new PointerEvent('eventType', { " + attr + ": NaN })." + attr);
shouldBeZero("new PointerEvent('eventType', { " + attr + ": null })." + attr);
- shouldBeZero("new PointerEvent('eventType', { " + attr + ": undefined })." + attr);
+ shouldBeEqualToNumber("new PointerEvent('eventType', { " + attr + ": undefined })." + attr, defaultValue);
shouldBeZero("new PointerEvent('eventType', { " + attr + ": [] })." + attr);
shouldBeEqualToNumber("new PointerEvent('eventType', { " + attr + ": [12] })." + attr, 12);

Powered by Google App Engine
This is Rietveld 408576698