Modified: trunk/LayoutTests/ChangeLog (246752 => 246753)
--- trunk/LayoutTests/ChangeLog 2019-06-24 19:00:17 UTC (rev 246752)
+++ trunk/LayoutTests/ChangeLog 2019-06-24 19:02:40 UTC (rev 246753)
@@ -1,5 +1,16 @@
2019-06-24 Antoine Quint <[email protected]>
+ [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html
+ https://bugs.webkit.org/show_bug.cgi?id=197007
+
+ Reviewed by Dean Jackson.
+
+ This test now works reliably, even if it fails the actual assertions.
+
+ * platform/mac/TestExpectations:
+
+2019-06-24 Antoine Quint <[email protected]>
+
[Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerevent_lostpointercapture_is_first.html
https://bugs.webkit.org/show_bug.cgi?id=197005
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (246752 => 246753)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2019-06-24 19:00:17 UTC (rev 246752)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2019-06-24 19:02:40 UTC (rev 246753)
@@ -1,5 +1,17 @@
2019-06-24 Antoine Quint <[email protected]>
+ [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html
+ https://bugs.webkit.org/show_bug.cgi?id=197007
+
+ Reviewed by Dean Jackson.
+
+ Update the test from the Web Platform Tests repository following the fix for https://github.com/web-platform-tests/wpt/issues/16406.
+
+ * web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked-expected.txt: Added.
+ * web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html:
+
+2019-06-24 Antoine Quint <[email protected]>
+
[Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerevent_lostpointercapture_is_first.html
https://bugs.webkit.org/show_bug.cgi?id=197005
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked-expected.txt (0 => 246753)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked-expected.txt 2019-06-24 19:02:40 UTC (rev 246753)
@@ -0,0 +1,13 @@
+Pointer Events movement in locked state test
+
+Follow the test instructions with mouse. If you don't have the device skip it.
+
+Test Description: This test checks the pointer event coordinates stays unchanged when pointer is locked.
+Click left mouse button on the green rectangle.
+Move the mouse around.
+Click left mouse button again.
+Test passes if the proper behavior of the events is observed.
+
+
+FAIL mouse Test pointerevent coordinates when pointer is locked assert_equals: clientX expected 41 but got 183
+
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html (246752 => 246753)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html 2019-06-24 19:00:17 UTC (rev 246752)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html 2019-06-24 19:02:40 UTC (rev 246753)
@@ -3,7 +3,7 @@
<head>
<title>Pointer Events pointer lock tests</title>
<meta name="viewport" content="width=device-width">
- <link rel="stylesheet" type="text/css" href=""
+ <link rel="stylesheet" type="text/css" href=""
<script src=""
<script src=""
<script src=""
@@ -36,21 +36,19 @@
var test_pointerEvent = setup_pointerevent_test("Test pointerevent coordinates when pointer is locked", ['mouse']);
var div1 = document.getElementById("target");
- on_event(div1, 'pointerdown', function(event) {
+ on_event(div1, 'click', function(event) {
if (test_state == kStateInit)
div1.requestPointerLock();
- });
- on_event(div1, 'pointerup', function(event) {
- if (test_state == kStateLocked)
+ else if (test_state == kStateLocked)
document.exitPointerLock();
});
on_event(div1, 'pointermove', function(event) {
if (test_state == kStateLocked) {
test_pointerEvent.step(function() {
- assert_equals(last_pointer_client_pos['x'], event.clientX)
- assert_equals(last_pointer_client_pos['y'], event.clientY)
- assert_equals(last_pointer_screen_pos['x'], event.screenX)
- assert_equals(last_pointer_screen_pos['y'], event.screenY)
+ assert_equals(event.clientX, last_pointer_client_pos['x'], 'clientX')
+ assert_equals(event.clientY, last_pointer_client_pos['y'], 'clientY')
+ assert_equals(event.screenX, last_pointer_screen_pos['x'], 'screenX')
+ assert_equals(event.screenY, last_pointer_screen_pos['y'], 'screenY')
});
} else {
last_pointer_client_pos = {'x': event.clientX, 'y': event.clientY}
@@ -63,6 +61,17 @@
test_pointerEvent.step(function() {
assert_equals(document.pointerLockElement, div1, "document.pointerLockElement should be div1.");
});
+
+ var actions = new test_driver.Actions();
+ pos_x = div1.offsetWidth / 2;
+ pos_y = div1.offsetHeight / 2;
+ for (var i = 0; i < 10; i++) {
+ // Move left and up.
+ pos_x += 10;
+ pos_y -= 10;
+ actions.pointerMove(pos_x, pos_y, {origin: div1});
+ }
+ actions.pointerDown().pointerUp().send();
} else if (test_state == kStateLocked) {
test_state = kStateUnlocked;
test_pointerEvent.step(function() {
@@ -72,18 +81,7 @@
}
});
- var actions = new test_driver.Actions();
- actions.pointerMove(/* x = */ 0, /* y = */ 0, {origin: div1}).pointerDown();
-
- pos_x = div1.offsetWidth / 2;
- pos_y = div1.offsetHeight / 2;
- for (var i = 0; i < 10; i++) {
- // Alternatively move left/right and up/down.
- pos_x += ((-1)**i) * i * 10;
- pos_y -= ((-1)**i) * i * 10;
- actions.pointerMove(pos_x, pos_y, {origin: div1});
- }
- actions.pointerUp().send();
+ new test_driver.Actions().pointerMove(/* x = */ 0, /* y = */ 0, {origin: div1}).pointerDown().pointerUp().send();
}
</script>
</head>
@@ -93,9 +91,9 @@
<h4>
Test Description: This test checks the pointer event coordinates stays unchanged when pointer is locked.
<ol>
- <li>Press left button down on the green rectangle and hold it.</li>
- <li>Move the mouse inside the green rectangle.</li>
- <li>Release mouse button. </li>
+ <li>Click left mouse button on the green rectangle.</li>
+ <li>Move the mouse around.</li>
+ <li>Click left mouse button again. </li>
</ol>
</ol>
@@ -102,7 +100,7 @@
Test passes if the proper behavior of the events is observed.
</h4>
<div id="testContainer">
- <div id="target" style="width:800px;height:250px;background:green"></div>
+ <div id="target" style="width:200px;height:200px;background:green"></div>
</div>
<div class="spacer"></div>
</body>
Modified: trunk/LayoutTests/platform/mac/TestExpectations (246752 => 246753)
--- trunk/LayoutTests/platform/mac/TestExpectations 2019-06-24 19:00:17 UTC (rev 246752)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2019-06-24 19:02:40 UTC (rev 246753)
@@ -1885,8 +1885,6 @@
imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_pointermove_in_pointerlock-manual.html [ Skip ]
imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_pointermove_on_chorded_mouse_button_when_locked-manual.html [ Skip ]
-webkit.org/b/197007 imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html [ Skip ]
-
webkit.org/b/192501 [ Debug ] animations/play-state-in-shorthand.html [ Pass Failure ]
webkit.org/b/197473 imported/w3c/web-platform-tests/resource-timing/resource-timing-level1.sub.html [ Pass Failure ]