Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 4fbab99095d1b31f272aab6d5e74d7788c9fb60a https://github.com/WebKit/WebKit/commit/4fbab99095d1b31f272aab6d5e74d7788c9fb60a Author: Brian Weinstein <bweinst...@apple.com> Date: 2023-11-17 (Fri, 17 Nov 2023)
Changed paths: M Source/WebKit/Modules/OSX_Private.modulemap M Source/WebKit/Modules/iOS_Private.modulemap M Source/WebKit/UIProcess/Extensions/Cocoa/_WKWebExtensionDeclarativeNetRequestRule.h M Source/WebKit/UIProcess/Extensions/Cocoa/_WKWebExtensionDeclarativeNetRequestRule.mm M Source/WebKit/UIProcess/Extensions/Cocoa/_WKWebExtensionDeclarativeNetRequestTranslator.h M Source/WebKit/UIProcess/Extensions/Cocoa/_WKWebExtensionDeclarativeNetRequestTranslator.mm M Source/WebKit/WebKit.xcodeproj/project.pbxproj M Tools/TestWebKitAPI/SourcesCocoa.txt M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj A Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIDeclarativeNetRequest.mm M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIExtension.mm Log Message: ----------- Add tests for _WKWebExtensionDeclarativeNetRequestRule and _WKWebExtensionDeclarativeNetRequestTranslator and make them SPI to use in TestWebKitAPI https://bugs.webkit.org/show_bug.cgi?id=265049 rdar://118570291 Reviewed by Timothy Hatcher. To add tests for these classes in TestWebKitAPI, the headers need to become private headers in the WebKit project. To do this, I needed to get rid of all ENABLE flags and implement a version of the classes when WK_WEB_EXTENSIONS is off. Doing this lets us add a lot of tests of the rule translator code into TestWebKitAPI. Adding this new file showed a latent compilation error in WKWebExtensionAPIExtension, so fix that while we are here. * Source/WebKit/Modules/OSX_Private.modulemap: * Source/WebKit/Modules/iOS_Private.modulemap: * Source/WebKit/UIProcess/Extensions/Cocoa/_WKWebExtensionDeclarativeNetRequestRule.h: * Source/WebKit/UIProcess/Extensions/Cocoa/_WKWebExtensionDeclarativeNetRequestRule.mm: (WebKit::if): (-[_WKWebExtensionDeclarativeNetRequestRule initWithDictionary:errorString:]): (-[_WKWebExtensionDeclarativeNetRequestRule compare:]): * Source/WebKit/UIProcess/Extensions/Cocoa/_WKWebExtensionDeclarativeNetRequestTranslator.h: * Source/WebKit/UIProcess/Extensions/Cocoa/_WKWebExtensionDeclarativeNetRequestTranslator.mm: (+[_WKWebExtensionDeclarativeNetRequestTranslator jsonObjectsFromData:errorStrings:]): (+[_WKWebExtensionDeclarativeNetRequestTranslator translateRules:errorStrings:]): * Source/WebKit/WebKit.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/SourcesCocoa.txt: * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIDeclarativeNetRequest.mm: Added. (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIExtension.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/270926@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes