Title: [230473] trunk/Tools
- Revision
- 230473
- Author
- zandober...@gmail.com
- Date
- 2018-04-09 23:30:54 -0700 (Mon, 09 Apr 2018)
Log Message
WKTR: Enable DOM cache, SW registration directory cleanup on non-Cocoa platforms
https://bugs.webkit.org/show_bug.cgi?id=184414
Reviewed by Michael Catanzaro.
Enable clearServiceWorkerRegistrations(), clearDOMCache() and
clearDOMCaches() implementations in WebKitTestRunner's TestController
class for non-Cocoa platforms. Implementations depend on the generic
WK2 C API that other ports can leverage as well.
The clearDOMCache() and clearDOMCaches() calls are now operational for
tests that invoke them. clearServiceWorkerRegistrations() and
clearDOMCaches() are also called between each test, cleaning up relevant
resources.
The TestController::getAllStorageAccessEntries() stub for non-Cocoa
platforms is moved into the main !PLATFORM(COCOA) block.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::getAllStorageAccessEntries):
(WTR::clearServiceWorkerRegistrationsCallback):
(WTR::TestController::clearServiceWorkerRegistrations):
(WTR::clearDOMCacheCallback):
(WTR::TestController::clearDOMCache):
(WTR::TestController::clearDOMCaches):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (230472 => 230473)
--- trunk/Tools/ChangeLog 2018-04-10 05:45:41 UTC (rev 230472)
+++ trunk/Tools/ChangeLog 2018-04-10 06:30:54 UTC (rev 230473)
@@ -1,3 +1,31 @@
+2018-04-09 Zan Dobersek <zdober...@igalia.com>
+
+ WKTR: Enable DOM cache, SW registration directory cleanup on non-Cocoa platforms
+ https://bugs.webkit.org/show_bug.cgi?id=184414
+
+ Reviewed by Michael Catanzaro.
+
+ Enable clearServiceWorkerRegistrations(), clearDOMCache() and
+ clearDOMCaches() implementations in WebKitTestRunner's TestController
+ class for non-Cocoa platforms. Implementations depend on the generic
+ WK2 C API that other ports can leverage as well.
+
+ The clearDOMCache() and clearDOMCaches() calls are now operational for
+ tests that invoke them. clearServiceWorkerRegistrations() and
+ clearDOMCaches() are also called between each test, cleaning up relevant
+ resources.
+
+ The TestController::getAllStorageAccessEntries() stub for non-Cocoa
+ platforms is moved into the main !PLATFORM(COCOA) block.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::getAllStorageAccessEntries):
+ (WTR::clearServiceWorkerRegistrationsCallback):
+ (WTR::TestController::clearServiceWorkerRegistrations):
+ (WTR::clearDOMCacheCallback):
+ (WTR::TestController::clearDOMCache):
+ (WTR::TestController::clearDOMCaches):
+
2018-04-09 Zalan Bujtas <za...@apple.com>
[LayoutReloaded] Add support for relatively positioned containers in inline formatting context.
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (230472 => 230473)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2018-04-10 05:45:41 UTC (rev 230472)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2018-04-10 06:30:54 UTC (rev 230473)
@@ -2420,9 +2420,12 @@
{
}
+void TestController::getAllStorageAccessEntries()
+{
+}
+
#endif
-#if PLATFORM(COCOA) && WK_API_ENABLED
struct ClearServiceWorkerRegistrationsCallbackContext {
explicit ClearServiceWorkerRegistrationsCallbackContext(TestController& controller)
: testController(controller)
@@ -2439,20 +2442,16 @@
context->done = true;
context->testController.notifyDone();
}
-#endif
void TestController::clearServiceWorkerRegistrations()
{
-#if PLATFORM(COCOA) && WK_API_ENABLED
auto websiteDataStore = WKContextGetWebsiteDataStore(platformContext());
ClearServiceWorkerRegistrationsCallbackContext context(*this);
WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations(websiteDataStore, &context, clearServiceWorkerRegistrationsCallback);
runUntil(context.done, noTimeout);
-#endif
}
-#if PLATFORM(COCOA) && WK_API_ENABLED
struct ClearDOMCacheCallbackContext {
explicit ClearDOMCacheCallbackContext(TestController& controller)
: testController(controller)
@@ -2469,11 +2468,9 @@
context->done = true;
context->testController.notifyDone();
}
-#endif
void TestController::clearDOMCache(WKStringRef origin)
{
-#if PLATFORM(COCOA) && WK_API_ENABLED
auto websiteDataStore = WKContextGetWebsiteDataStore(platformContext());
ClearDOMCacheCallbackContext context(*this);
@@ -2480,18 +2477,15 @@
auto cacheOrigin = adoptWK(WKSecurityOriginCreateFromString(origin));
WKWebsiteDataStoreRemoveFetchCacheForOrigin(websiteDataStore, cacheOrigin.get(), &context, clearDOMCacheCallback);
runUntil(context.done, noTimeout);
-#endif
}
void TestController::clearDOMCaches()
{
-#if PLATFORM(COCOA) && WK_API_ENABLED
auto websiteDataStore = WKContextGetWebsiteDataStore(platformContext());
ClearDOMCacheCallbackContext context(*this);
WKWebsiteDataStoreRemoveAllFetchCaches(websiteDataStore, &context, clearDOMCacheCallback);
runUntil(context.done, noTimeout);
-#endif
}
struct FetchCacheOriginsCallbackContext {
@@ -2829,11 +2823,4 @@
WKWebsiteDataStoreStatisticsResetToConsistentState(dataStore);
}
-#if !PLATFORM(COCOA)
-void TestController::getAllStorageAccessEntries()
-{
- // FIXME: Implement C API version of this test.
-}
-#endif
-
} // namespace WTR
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes