Bug 259104
| Summary: | [WPE] gamepad/gamepad-visibility-1.html is failing | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Diego Pino <dpino> |
| Component: | New Bugs | Assignee: | Diego Pino <dpino> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=267523 | ||
Diego Pino
The test fails with the following output:
```
https://build.webkit.org/results/WPE-Linux-64-bit-Release-Tests/265940%40main%20%2811048%29/gamepad/gamepad-visibility-1-diff.txt
--- /home/buildbot/worker/WPE-Linux-64-bit-Release-Tests/build/layout-test-results/gamepad/gamepad-visibility-1-expected.txt
+++ /home/buildbot/worker/WPE-Linux-64-bit-Release-Tests/build/layout-test-results/gamepad/gamepad-visibility-1-actual.txt
@@ -1,2 +1,2 @@
-No connect event seen in 20 run loop spins. Yay.
+Connect event seen! Should NOT have been seen
```
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Diego Pino
Pull request: https://github.com/webkit/webkit/pull/15736
EWS
Committed 265981@main (7e6a722f6ccc): <https://commits.webkit.org/265981@main>
Reviewed commits have been landed. Closing PR #15736 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/112117342>
Diego Pino
The proposed fix made other tests fail (timeout):
```
gamepad/gamepad-polling-access.html
gamepad/gamepad-timestamp.html
gamepad/gamepad-vibration-document-no-longer-fully-active.html
gamepad/gamepad-vibration-visibility-change.html
gamepad/gamepad-vibrationActuator-SameObject.html
gamepad/gamepad-vibrationActuator-nullable.html
gamepad/gamepad-vibrationActuator-playEffect-validation.html
gamepad/gamepad-vibrationActuator-type.html
```
Diego Pino
Pull request: https://github.com/WebKit/WebKit/pull/50163
Diego Pino
This test was failing in all platforms:
https://results.webkit.org/?suite=layout-tests&test=gamepad%2Fgamepad-visibility-1.html&platform=GTK&platform=WPE&platform=mac
Only WebKitGTK, WPEWebKit and Mac were running this test. All other platforms are skipping it. Mac marks the test as flaky, but results.webkit.org shows the test has been constantly failing.
What the test intents to do is to connect a gamepad and change its axis values to verify none of these events emit a 'gamepadconnect' event. However, the method 'connectMockGamepad' always emits a 'gamepadconnect' event, which makes the test fails.
What I think the test tries to validate is this paragraph from the Gamepad spec:
"A user agent MUST dispatch this event type to indicate the user has connected a gamepad. If a gamepad was already connected when the page was loaded, the gamepadconnected event SHOULD be dispatched when the user presses a button or moves an axis."
https://www.w3.org/TR/gamepad/#event-gamepadconnected
Right now, the class 'MockGamepad' doesn't feature a way of reflecting the scenario described in the spec, which is "a gamepad was already connected". For this reason, I added an extra argument 'wasConnected' to the 'setMockGamepadDetails', so when the pad executes 'connectMockGamepad' doesn't emit a 'gamepadconnect' event in case 'wasConnected' was true.
Still, I think the logic of the test is wrong, because it verifies that changing the axis of a gamepad already connected doesn't emit a 'gamepadconnect' event, but the spec says it SHOULD. For the moment, I prefer to focus on fixing this test as it is and later change its behaviour to comply with the spec.
EWS
Committed 299621@main (2a2bdc0d50da): <https://commits.webkit.org/299621@main>
Reviewed commits have been landed. Closing PR #50163 and removing active labels.