Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2a2bdc0d50dab2388f3b8d908aa577081e3a0314
https://github.com/WebKit/WebKit/commit/2a2bdc0d50dab2388f3b8d908aa577081e3a0314
Author: Diego Pino Garcia <[email protected]>
Date: 2025-09-05 (Fri, 05 Sep 2025)
Changed paths:
M LayoutTests/gamepad/gamepad-visibility-1.html
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/mac-wk2/TestExpectations
M Source/WebCore/testing/MockGamepad.cpp
M Source/WebCore/testing/MockGamepad.h
M Source/WebCore/testing/MockGamepadProvider.cpp
M Source/WebCore/testing/MockGamepadProvider.h
M Source/WebCore/testing/js/WebCoreTestSupport.cpp
M Source/WebCore/testing/js/WebCoreTestSupport.h
M Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
M Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
M Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
M Tools/WebKitTestRunner/TestInvocation.cpp
Log Message:
-----------
gamepad/gamepad-visibility-1.html is failing
https://bugs.webkit.org/show_bug.cgi?id=259104
Reviewed by Adrian Perez de Castro.
This test was failing in all platforms. The test connects a mock gamepad and
changes axis values. The test expects that none of these events should
emit a 'gamepadconnect' event. However, the method 'connectMockGamepad' always
emits a 'gamepadconnect' event, which makes the test fail.
To fix the test, I added an extra argument 'wasConnected' to
'setMockGamepadDetails',
so when 'connectMockGamepad' is called the method doesn't emit a
'gamepadconnect'
event. This allows to implement a scenario similar to when a page is loaded and
there's a gamepad already connected.
* LayoutTests/gamepad/gamepad-visibility-1.html:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/testing/MockGamepad.cpp:
(WebCore::MockGamepad::MockGamepad):
(WebCore::MockGamepad::updateDetails):
* Source/WebCore/testing/MockGamepad.h:
(WebCore::MockGamepad::wasConnected):
* Source/WebCore/testing/MockGamepadProvider.cpp:
(WebCore::MockGamepadProvider::setMockGamepadDetails):
(WebCore::MockGamepadProvider::connectMockGamepad):
* Source/WebCore/testing/MockGamepadProvider.h:
* Source/WebCore/testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::setMockGamepadDetails):
* Source/WebCore/testing/js/WebCoreTestSupport.h:
* Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setMockGamepadDetails):
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.h:
* Tools/WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
Canonical link: https://commits.webkit.org/299621@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes