WebKit Bugzilla
Attachment 372762 Details for
Bug 197007
: [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197007-20190624170723.patch (text/plain), 9.25 KB, created by
Antoine Quint
on 2019-06-24 08:07:24 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2019-06-24 08:07:24 PDT
Size:
9.25 KB
patch
obsolete
>Subversion Revision: 246729 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 05057be3d841691393bcafe075bd7577c92de7c0..84a74850a9c24a265b56f883e8017c186bf06b8b 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2019-06-24 Antoine Quint <graouts@apple.com> >+ >+ [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 NOBODY (OOPS!). >+ >+ This test now works reliably, even if it fails the actual assertions. >+ >+ * platform/mac/TestExpectations: >+ > 2019-06-24 Antoine Quint <graouts@apple.com> > > [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 372878c914e08cc2b35236b1b40ba771b3693ace..7676bc39d3ea5abf777643a2ab3519c5229bd343 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,15 @@ >+2019-06-24 Antoine Quint <graouts@apple.com> >+ >+ [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 NOBODY (OOPS!). >+ >+ 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 <graouts@apple.com> > > [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover >diff --git a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..e3873e6a3be410ecf64f4622658bd799f9370cd7 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked-expected.txt >@@ -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 >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html >index 9dfd5e1764d33dfd1af7ee62af20b1e0424ac64b..a79327252277d3b27e416e885b27ff6cb0b0bf5d 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html >@@ -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="/external/wpt/pointerevents/pointerevent_styles.css"> >+ <link rel="stylesheet" type="text/css" href="../pointerevent_styles.css"> > <script src="/resources/testharness.js"></script> > <script src="/resources/testharnessreport.js"></script> > <script src="/resources/testdriver.js"></script> >@@ -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,16 +91,16 @@ > <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> > > 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> >diff --git a/LayoutTests/platform/mac/TestExpectations b/LayoutTests/platform/mac/TestExpectations >index dab2ff787b78eeee866747db76629408a6c31b36..8a03b161ec9eebcac8f4f8a9afa78b9e19ab3b7a 100644 >--- a/LayoutTests/platform/mac/TestExpectations >+++ b/LayoutTests/platform/mac/TestExpectations >@@ -1886,7 +1886,6 @@ imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_pointermo > imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_pointermove_on_chorded_mouse_button_when_locked-manual.html [ Skip ] > > webkit.org/b/197005 imported/w3c/web-platform-tests/pointerevents/pointerevent_lostpointercapture_is_first.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 ] >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dino
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197007
: 372762