haikuwebkit/Tools/TestWebKitAPI/Configurations/TestWebKitAPI-macOS-interna...

20 lines
735 B
Plaintext
Raw Permalink Normal View History

Add Gamepad tests that exercise the native frameworks <rdar://problem/65343674> and https://bugs.webkit.org/show_bug.cgi?id=214188 Reviewed by Tim Horton. Source/WebCore: * platform/gamepad/mac/MultiGamepadProvider.h: (WebCore::MultiGamepadProvider::setUsesOnlyHIDGamepadProvider): * platform/gamepad/mac/MultiGamepadProvider.mm: (WebCore::MultiGamepadProvider::startMonitoringGamepads): (WebCore::MultiGamepadProvider::stopMonitoringGamepads): Source/WebKit: Add some testing-only SPI for TestWebKitAPI. * UIProcess/API/Cocoa/WKProcessPool.mm: (-[WKProcessPool _numberOfConnectedGamepadsForTesting]): (-[WKProcessPool _setUsesOnlyHIDGamepadProviderForTesting:]): * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: * UIProcess/Gamepad/UIGamepadProvider.h: (WebKit::UIGamepadProvider::numberOfConnectedGamepads const): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::numberOfConnectedGamepadsForTesting): (WebKit::WebProcessPool::setUsesOnlyHIDGamepadProviderForTesting): * UIProcess/WebProcessPool.h: Source/WTF: * wtf/PlatformHave.h: Tools: For Internal builds, we can create HID devices that exercise the native gamepad providers. E.g. Actually exercise the IOHID gamepad provider codepath. Give the Internal TestWebKitAPI build some entitlements: * TestWebKitAPI/Configurations/TestWebKitAPI-macOS-internal.entitlements: Added. * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add a very basic test that connects a device, presses a button, and verifies the web page sees it: * TestWebKitAPI/Tests/mac/HIDGamepads.mm: Added. (-[GamepadMessageHandler userContentController:didReceiveScriptMessage:]): (TestWebKitAPI::handleGamepadConnect): Add the beginnings of a VirtualGamepad device that reads in a HID descriptor (just like real gamepads): * TestWebKitAPI/mac/VirtualGamepad.h: Added. * TestWebKitAPI/mac/VirtualGamepad.mm: Added. (TestWebKitAPI::VirtualGamepad::makeVirtualNimbus): (TestWebKitAPI::VirtualGamepad::VirtualGamepad): (TestWebKitAPI::VirtualGamepad::~VirtualGamepad): (TestWebKitAPI::VirtualGamepad::setButtonValue): (TestWebKitAPI::VirtualGamepad::setAxisValue): (TestWebKitAPI::VirtualGamepad::publishReport): WebKitLibraries: * WebKitPrivateFrameworkStubs/Mac/101500/HID.framework/HID.tbd: Added. * WebKitPrivateFrameworkStubs/Mac/101600/HID.framework/HID.tbd: Added. * WebKitPrivateFrameworkStubs/Mac/110000/HID.framework/HID.tbd: Added. Canonical link: https://commits.webkit.org/227505@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-23 16:36:15 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.hid.manager.user-access-device</key>
<true/>
<key>com.apple.private.hid.client.event-filter</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>com.apple.TestWebKitAPI</string>
</array>
<key>com.apple.security.temporary-exception.sbpl</key>
<array>
<string>(allow mach-issue-extension (require-all (extension-class &quot;com.apple.webkit.extension.mach&quot;)))</string>
<string>(allow iokit-issue-extension (require-all (extension-class &quot;com.apple.webkit.extension.iokit&quot;)))</string>
Add Gamepad tests that exercise the native frameworks <rdar://problem/65343674> and https://bugs.webkit.org/show_bug.cgi?id=214188 Reviewed by Tim Horton. Source/WebCore: * platform/gamepad/mac/MultiGamepadProvider.h: (WebCore::MultiGamepadProvider::setUsesOnlyHIDGamepadProvider): * platform/gamepad/mac/MultiGamepadProvider.mm: (WebCore::MultiGamepadProvider::startMonitoringGamepads): (WebCore::MultiGamepadProvider::stopMonitoringGamepads): Source/WebKit: Add some testing-only SPI for TestWebKitAPI. * UIProcess/API/Cocoa/WKProcessPool.mm: (-[WKProcessPool _numberOfConnectedGamepadsForTesting]): (-[WKProcessPool _setUsesOnlyHIDGamepadProviderForTesting:]): * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: * UIProcess/Gamepad/UIGamepadProvider.h: (WebKit::UIGamepadProvider::numberOfConnectedGamepads const): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::numberOfConnectedGamepadsForTesting): (WebKit::WebProcessPool::setUsesOnlyHIDGamepadProviderForTesting): * UIProcess/WebProcessPool.h: Source/WTF: * wtf/PlatformHave.h: Tools: For Internal builds, we can create HID devices that exercise the native gamepad providers. E.g. Actually exercise the IOHID gamepad provider codepath. Give the Internal TestWebKitAPI build some entitlements: * TestWebKitAPI/Configurations/TestWebKitAPI-macOS-internal.entitlements: Added. * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add a very basic test that connects a device, presses a button, and verifies the web page sees it: * TestWebKitAPI/Tests/mac/HIDGamepads.mm: Added. (-[GamepadMessageHandler userContentController:didReceiveScriptMessage:]): (TestWebKitAPI::handleGamepadConnect): Add the beginnings of a VirtualGamepad device that reads in a HID descriptor (just like real gamepads): * TestWebKitAPI/mac/VirtualGamepad.h: Added. * TestWebKitAPI/mac/VirtualGamepad.mm: Added. (TestWebKitAPI::VirtualGamepad::makeVirtualNimbus): (TestWebKitAPI::VirtualGamepad::VirtualGamepad): (TestWebKitAPI::VirtualGamepad::~VirtualGamepad): (TestWebKitAPI::VirtualGamepad::setButtonValue): (TestWebKitAPI::VirtualGamepad::setAxisValue): (TestWebKitAPI::VirtualGamepad::publishReport): WebKitLibraries: * WebKitPrivateFrameworkStubs/Mac/101500/HID.framework/HID.tbd: Added. * WebKitPrivateFrameworkStubs/Mac/101600/HID.framework/HID.tbd: Added. * WebKitPrivateFrameworkStubs/Mac/110000/HID.framework/HID.tbd: Added. Canonical link: https://commits.webkit.org/227505@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-23 16:36:15 +00:00
</array>
</dict>
</plist>