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

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

Issue 1809603003: Separate mouse transition events from pointerevent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better comment Created 4 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f26865571da2a03cdaffc67032112103f3bd0e3e..3cff0b4ad65ca686824e4ff5a2ae7ce6d3497441 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
@@ -19,7 +19,7 @@ description("Verifies that pointer event parameters are correct when fired for m
var testEventList = ["mouseenter", "mouseleave", "mouseover", "mouseout", "mouseup", "mousedown", "mousemove",
"pointerenter", "pointerleave", "pointerover", "pointerout", "pointerup", "pointerdown", "pointermove"];
-var lastPointerEvent = null;
+var lastPointerEvents = [];
var checkKeyModifiers = false;
@@ -53,24 +53,28 @@ function init() {
debug("Received " + event.type);
if (event.type.startsWith("pointer"))
- lastPointerEvent = event;
+ lastPointerEvents.push(event);
else {
- shouldBeNonNull("lastPointerEvent");
- shouldBeEqualToString("lastPointerEvent.type", event.type.replace("mouse", "pointer"));
+ if (event.type == "mouseout" || event.type == "mouseover") {
+ shouldBeEqualToNumber("lastPointerEvents.length", 2);
+ } else {
+ shouldBeEqualToNumber("lastPointerEvents.length", 1);
+ }
+ shouldBeEqualToString("lastPointerEvents[0].type", event.type.replace("mouse", "pointer"));
if (!checkKeyModifiers) {
- if (lastPointerEvent.type=="pointerenter" || lastPointerEvent.type=="pointerleave") {
- shouldBeFalse("lastPointerEvent.bubbles");
- shouldBeFalse("lastPointerEvent.cancelable");
+ if (lastPointerEvents[0].type=="pointerenter" || lastPointerEvents[0].type=="pointerleave") {
+ shouldBeFalse("lastPointerEvents[0].bubbles");
+ shouldBeFalse("lastPointerEvents[0].cancelable");
} else {
- shouldBeTrue("lastPointerEvent.bubbles");
- shouldBeTrue("lastPointerEvent.cancelable");
+ shouldBeTrue("lastPointerEvents[0].bubbles");
+ shouldBeTrue("lastPointerEvents[0].cancelable");
}
- shouldBeEqualToNumber("lastPointerEvent.pointerId", 1);
- shouldBeEqualToString("lastPointerEvent.pointerType", "mouse");
- shouldBeTrue("lastPointerEvent.isPrimary");
+ shouldBeEqualToNumber("lastPointerEvents[0].pointerId", 1);
+ shouldBeEqualToString("lastPointerEvents[0].pointerType", "mouse");
+ shouldBeTrue("lastPointerEvents[0].isPrimary");
numericAttributes.forEach(function(attribute) {
var expectedValue = eval("event." + attribute);
@@ -82,7 +86,7 @@ function init() {
else
expectedValue = 0.5;
}
- shouldBeEqualToNumber("lastPointerEvent." + attribute, expectedValue);
+ shouldBeEqualToNumber("lastPointerEvents[0]." + attribute, expectedValue);
});
} else {
@@ -90,14 +94,14 @@ function init() {
forEachModifier(function(attr, modifierName) {
var getModifierStateStr = ".getModifierState('" + modifierName + "');"
if (eval("event" + getModifierStateStr))
- shouldBeTrue("lastPointerEvent" + getModifierStateStr);
+ shouldBeTrue("lastPointerEvents[0]" + getModifierStateStr);
else
- shouldBeFalse("lastPointerEvent" + getModifierStateStr);
+ shouldBeFalse("lastPointerEvents[0]" + getModifierStateStr);
});
}
- lastPointerEvent = null;
+ lastPointerEvents.splice(0, 1);
}
});
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698