WebKit Bugzilla
Attachment 361804 Details for
Bug 194515
: [WKTR] Unify setup for content extensions tests among ports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194515-20190212201033.patch (text/plain), 6.50 KB, created by
Adrian Perez
on 2019-02-12 10:10:34 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Adrian Perez
Created:
2019-02-12 10:10:34 PST
Size:
6.50 KB
patch
obsolete
>Subversion Revision: 241299 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 9d83ea317ce6992f5df2c52c5639dde6b819761a..9e850e494405f20b31dc9f80fac9adb110a521e5 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,18 @@ >+2019-02-12 Adrian Perez de Castro <aperez@igalia.com> >+ >+ [WKTR] Unify setup for content extensions tests among ports >+ https://bugs.webkit.org/show_bug.cgi?id=194515 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebKitTestRunner/TestController.cpp: Remove !PLATFORM(COCOA) guards. >+ * WebKitTestRunner/cocoa/TestControllerCocoa.mm: Remove platform-specific >+ TestController::resetContentExtensions() implementation. >+ * WebKitTestRunner/ios/TestControllerIOS.mm: Remove empty >+ TestController::configureContentExtensionForTest() function. >+ * WebKitTestRunner/mac/TestControllerMac.mm: Remove platform-specific >+ TestController::configureContentExtensionForTest() function. >+ > 2019-02-12 Andy Estes <aestes@apple.com> > > [iOSMac] Enable Parental Controls Content Filtering >diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp >index 7747f8d07b4968289a0ac83285f6817a5b18be72..a865240f5c15c6181fc98ef67038f672f9dcbb98 100644 >--- a/Tools/WebKitTestRunner/TestController.cpp >+++ b/Tools/WebKitTestRunner/TestController.cpp >@@ -1339,7 +1339,7 @@ void TestController::configureViewForTest(const TestInvocation& test) > platformConfigureViewForTest(test); > } > >-#if ENABLE(CONTENT_EXTENSIONS) && !PLATFORM(COCOA) >+#if ENABLE(CONTENT_EXTENSIONS) > struct ContentExtensionStoreCallbackContext { > explicit ContentExtensionStoreCallbackContext(TestController& controller) > : testController(controller) >@@ -1372,10 +1372,7 @@ static std::string contentExtensionJSONPath(WKURLRef url) > const auto length = WKStringGetUTF8CString(p.get(), buffer.data(), buffer.size()); > return std::string("LayoutTests/http/tests") + std::string(buffer.data(), length - 1) + ".json"; > } >-#endif > >-#if !PLATFORM(COCOA) >-#if ENABLE(CONTENT_EXTENSIONS) > void TestController::configureContentExtensionForTest(const TestInvocation& test) > { > const char* contentExtensionsPath = libraryPathForTesting(); >@@ -1446,7 +1443,6 @@ void TestController::resetContentExtensions() > { > } > #endif // ENABLE(CONTENT_EXTENSIONS) >-#endif // !PLATFORM(COCOA) > > class CommandTokenizer { > public: >diff --git a/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm b/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm >index fe3bd6e0e5484cf83233b727fb2c1d56293beadf..cf83df5d15f1bad7549ed49b3d74c824cb859e00 100644 >--- a/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm >+++ b/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm >@@ -239,23 +239,6 @@ void TestController::setDefaultCalendarType(NSString *identifier) > m_calendarSwizzler = std::make_unique<ClassMethodSwizzler>([NSCalendar class], @selector(currentCalendar), reinterpret_cast<IMP>(swizzledCalendar)); > } > >-void TestController::resetContentExtensions() >-{ >-#if WK_API_ENABLED >- __block bool doneRemoving = false; >- [[_WKUserContentExtensionStore defaultStore] removeContentExtensionForIdentifier:@"TestContentExtensions" completionHandler:^(NSError *error) { >- doneRemoving = true; >- }]; >- platformRunUntil(doneRemoving, noTimeout); >- [[_WKUserContentExtensionStore defaultStore] _removeAllContentExtensions]; >- >- if (auto* webView = mainWebView()) { >- TestRunnerWKWebView *platformView = webView->platformView(); >- [platformView.configuration.userContentController _removeAllUserContentFilters]; >- } >-#endif >-} >- > void TestController::cocoaResetStateToConsistentValues(const TestOptions& options) > { > #if WK_API_ENABLED >diff --git a/Tools/WebKitTestRunner/ios/TestControllerIOS.mm b/Tools/WebKitTestRunner/ios/TestControllerIOS.mm >index 21bd497785ca7302acb5df5118db702158301b40..04011a6b3544837c559851730f699d76987214c3 100644 >--- a/Tools/WebKitTestRunner/ios/TestControllerIOS.mm >+++ b/Tools/WebKitTestRunner/ios/TestControllerIOS.mm >@@ -105,10 +105,6 @@ void TestController::initializeTestPluginDirectory() > m_testPluginDirectory.adopt(WKStringCreateWithCFString((CFStringRef)[[NSBundle mainBundle] bundlePath])); > } > >-void TestController::configureContentExtensionForTest(const TestInvocation&) >-{ >-} >- > void TestController::platformResetPreferencesToConsistentValues() > { > WKPreferencesRef preferences = platformPreferences(); >diff --git a/Tools/WebKitTestRunner/mac/TestControllerMac.mm b/Tools/WebKitTestRunner/mac/TestControllerMac.mm >index 3e773bc0d5b523a35a406408c81cdb157950afe2..df0c9785dc28571d385fe258c9c1e533bc5f4163 100644 >--- a/Tools/WebKitTestRunner/mac/TestControllerMac.mm >+++ b/Tools/WebKitTestRunner/mac/TestControllerMac.mm >@@ -118,41 +118,6 @@ void TestController::updatePlatformSpecificTestOptionsForTest(TestOptions& optio > options.shouldShowWebView = shouldShowWebView(); > } > >-void TestController::configureContentExtensionForTest(const TestInvocation& test) >-{ >-#if WK_API_ENABLED >- if (!test.urlContains("contentextensions/")) >- return; >- >- RetainPtr<CFURLRef> testURL = adoptCF(WKURLCopyCFURL(kCFAllocatorDefault, test.url())); >- NSURL *filterURL = [(__bridge NSURL *)testURL.get() URLByAppendingPathExtension:@"json"]; >- >- NSStringEncoding encoding; >- NSString *contentExtensionString = [[NSString alloc] initWithContentsOfURL:filterURL usedEncoding:&encoding error:NULL]; >- if (!contentExtensionString) >- return; >- >- __block bool doneCompiling = false; >- >- NSURL *tempDir; >- if (const char* dumpRenderTreeTemp = libraryPathForTesting()) { >- String temporaryFolder = String::fromUTF8(dumpRenderTreeTemp); >- tempDir = [NSURL fileURLWithPath:[(NSString*)temporaryFolder stringByAppendingPathComponent:@"ContentExtensions"] isDirectory:YES]; >- } else >- tempDir = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:@"ContentExtensions"] isDirectory:YES]; >- >- [[_WKUserContentExtensionStore storeWithURL:tempDir] compileContentExtensionForIdentifier:@"TestContentExtensions" encodedContentExtension:contentExtensionString completionHandler:^(_WKUserContentFilter *filter, NSError *error) >- { >- if (!error) >- [mainWebView()->platformView().configuration.userContentController _addUserContentFilter:filter]; >- else >- NSLog(@"%@", [error helpAnchor]); >- doneCompiling = true; >- }]; >- platformRunUntil(doneCompiling, noTimeout); >-#endif >-} >- > void TestController::platformConfigureViewForTest(const TestInvocation& test) > { > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mcatanzaro
:
review-
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194515
: 361804 |
361807