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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties.html

Issue 1617863002: Set the correct pressure for pointer events based on force (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the tests Created 4 years, 11 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/pointerevents/mouse-pointer-event-properties.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties.html b/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties.html
index b0cdefa7106fe5f7af4abcdae3b5f2864fe9a426..f79c6dbeecfbdce82961c1971adcb9a91b3690cc 100644
--- a/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties.html
+++ b/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties.html
@@ -40,6 +40,7 @@ var numericAttributes = [
"y",
"button",
"buttons",
+ "pressure",
];
function init() {
@@ -76,6 +77,12 @@ function init() {
var expectedValue = eval("event." + attribute);
if (attribute == "button" && event.type != "mousedown" && event.type != "mouseup")
expectedValue = -1;
+ if (attribute == "pressure") {
+ if (event.buttons == 0)
+ expectedValue = 0.0;
+ else
+ expectedValue = 0.5;
+ }
shouldBeEqualToNumber("lastPointerEvent." + attribute, expectedValue);
});

Powered by Google App Engine
This is Rietveld 408576698