Changeset 253355 in webkit
- Timestamp:
- Dec 10, 2019 5:19:00 PM (4 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r253343 r253355 1 2019-12-10 Per Arne Vollan <pvollan@apple.com> 2 3 Fix API test failure after r253351 4 https://bugs.webkit.org/show_bug.cgi?id=205089 5 6 Reviewed by Brent Fulgham. 7 8 With the patch landed in r253351, the NetworkExtension framework will not be loaded in the WebContent process unless 9 [NEFilterSource filterRequired] returns YES. Swizzle this method to return YES in the UI process. 10 11 * TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm: 12 (filterRequired): 13 (TEST): 14 1 15 2019-12-10 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm
r248673 r253355 39 39 #import <WebKit/_WKRemoteObjectInterface.h> 40 40 #import <WebKit/_WKRemoteObjectRegistry.h> 41 #import <pal/spi/cocoa/NEFilterSourceSPI.h> 41 42 #import <wtf/RetainPtr.h> 43 #import <wtf/SoftLinking.h> 44 45 SOFT_LINK_FRAMEWORK_OPTIONAL(NetworkExtension); 46 SOFT_LINK_CLASS_OPTIONAL(NetworkExtension, NEFilterSource); 42 47 43 48 using Decision = WebCore::MockContentFilterSettings::Decision; … … 376 381 @end 377 382 383 static BOOL filterRequired(id self, SEL _cmd) 384 { 385 return YES; 386 } 387 378 388 TEST(ContentFiltering, LazilyLoadPlatformFrameworks) 379 389 { 390 // Swizzle [NEFilterSource filterRequired] to return YES in the UI process since NetworkExtension will not be loaded otherwise. 391 Method method = class_getClassMethod(getNEFilterSourceClass(), @selector(filterRequired)); 392 method_setImplementation(method, reinterpret_cast<IMP>(filterRequired)); 393 380 394 @autoreleasepool { 381 395 auto controller = adoptNS([[LazilyLoadPlatformFrameworksController alloc] init]);
Note: See TracChangeset
for help on using the changeset viewer.