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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/pointerevents/pointerevent_lostpointercapture_is_first-manual.html

Issue 2376103007: Import wpt@09907a9c4bcee14986431d53e4381384c7c69107 (Closed)
Patch Set: update platform expectations Created 4 years, 3 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/imported/wpt/pointerevents/pointerevent_lostpointercapture_is_first-manual.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/pointerevents/pointerevent_lostpointercapture_is_first-manual.html b/third_party/WebKit/LayoutTests/imported/wpt/pointerevents/pointerevent_lostpointercapture_is_first-manual.html
index 91f2b0d386976518381af6bd7654d988be782d93..e446d1844295684df3bbea03e82c02aef12c4957 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/pointerevents/pointerevent_lostpointercapture_is_first-manual.html
+++ b/third_party/WebKit/LayoutTests/imported/wpt/pointerevents/pointerevent_lostpointercapture_is_first-manual.html
@@ -16,7 +16,7 @@
This test checks if lostpointercapture is handled asynchronously and prior to all subsequent events.
Complete the following actions:
<ol>
- <li>Press and hold left mouse button over "Set Capture" button. "gotpointercapture" should be logged inside of the black rectangle
+ <li>Press and hold left mouse button over "Set Capture" button and move a little. "gotpointercapture" should be logged inside of the black rectangle
<li>"lostpointercapture" should be logged inside of the black rectangle after pointerup
</ol>
</h4>
@@ -28,6 +28,9 @@
var detected_pointertypes = {};
var detected_pointerEvents = new Array();
var pointerdown_event = null;
+ var firstPointermoveReceived = false; // To handle the first pointermove right after gotpointercapture which gotpointercapture was sent right before it.
+ var firstPointeroverReceived = false; // To handle the first pointerover right after gotpointercapture which gotpointercapture was sent right before it.
+ var firstPointerenterReceived = false; // To handle the first pointeenter right after gotpointercapture which gotpointercapture was sent right before it.
var test_pointerEvent = async_test("lostpointercapture is dispatched prior to subsequent events"); // set up test harness
@@ -97,9 +100,20 @@
test_pointerEvent.done(); // complete test
}
else {
- if (testStarted && pointerdown_event != null && pointerdown_event.pointerId === event.pointerId && event.type != "pointerup") {
- detected_pointerEvents.push(event.type);
- eventRcvd = true;
+ if (testStarted && pointerdown_event != null && pointerdown_event.pointerId === event.pointerId) {
+ if (event.type == "pointermove" && !firstPointermoveReceived) {
+ firstPointermoveReceived = true;
+ }
+ else if (event.type == "pointerenter" && !firstPointerenterReceived) {
+ firstPointerenterReceived = true;
+ }
+ else if (event.type == "pointerover" && !firstPointeroverReceived) {
+ firstPointeroverReceived = true;
+ }
+ else if (event.type != "pointerup") {
+ detected_pointerEvents.push(event.type);
+ eventRcvd = true;
+ }
}
}
});
@@ -112,4 +126,4 @@
</div>
<div id="log"></div>
</body>
-</html>
+</html>

Powered by Google App Engine
This is Rietveld 408576698