Changeset 230473 in webkit
- Timestamp:
- Apr 9, 2018 11:30:54 PM (6 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r230469 r230473 1 2018-04-09 Zan Dobersek <zdobersek@igalia.com> 2 3 WKTR: Enable DOM cache, SW registration directory cleanup on non-Cocoa platforms 4 https://bugs.webkit.org/show_bug.cgi?id=184414 5 6 Reviewed by Michael Catanzaro. 7 8 Enable clearServiceWorkerRegistrations(), clearDOMCache() and 9 clearDOMCaches() implementations in WebKitTestRunner's TestController 10 class for non-Cocoa platforms. Implementations depend on the generic 11 WK2 C API that other ports can leverage as well. 12 13 The clearDOMCache() and clearDOMCaches() calls are now operational for 14 tests that invoke them. clearServiceWorkerRegistrations() and 15 clearDOMCaches() are also called between each test, cleaning up relevant 16 resources. 17 18 The TestController::getAllStorageAccessEntries() stub for non-Cocoa 19 platforms is moved into the main !PLATFORM(COCOA) block. 20 21 * WebKitTestRunner/TestController.cpp: 22 (WTR::TestController::getAllStorageAccessEntries): 23 (WTR::clearServiceWorkerRegistrationsCallback): 24 (WTR::TestController::clearServiceWorkerRegistrations): 25 (WTR::clearDOMCacheCallback): 26 (WTR::TestController::clearDOMCache): 27 (WTR::TestController::clearDOMCaches): 28 1 29 2018-04-09 Zalan Bujtas <zalan@apple.com> 2 30 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r230391 r230473 2421 2421 } 2422 2422 2423 void TestController::getAllStorageAccessEntries() 2424 { 2425 } 2426 2423 2427 #endif 2424 2428 2425 #if PLATFORM(COCOA) && WK_API_ENABLED2426 2429 struct ClearServiceWorkerRegistrationsCallbackContext { 2427 2430 explicit ClearServiceWorkerRegistrationsCallbackContext(TestController& controller) … … 2440 2443 context->testController.notifyDone(); 2441 2444 } 2442 #endif2443 2445 2444 2446 void TestController::clearServiceWorkerRegistrations() 2445 2447 { 2446 #if PLATFORM(COCOA) && WK_API_ENABLED2447 2448 auto websiteDataStore = WKContextGetWebsiteDataStore(platformContext()); 2448 2449 ClearServiceWorkerRegistrationsCallbackContext context(*this); … … 2450 2451 WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations(websiteDataStore, &context, clearServiceWorkerRegistrationsCallback); 2451 2452 runUntil(context.done, noTimeout); 2452 #endif 2453 } 2454 2455 #if PLATFORM(COCOA) && WK_API_ENABLED 2453 } 2454 2456 2455 struct ClearDOMCacheCallbackContext { 2457 2456 explicit ClearDOMCacheCallbackContext(TestController& controller) … … 2470 2469 context->testController.notifyDone(); 2471 2470 } 2472 #endif2473 2471 2474 2472 void TestController::clearDOMCache(WKStringRef origin) 2475 2473 { 2476 #if PLATFORM(COCOA) && WK_API_ENABLED2477 2474 auto websiteDataStore = WKContextGetWebsiteDataStore(platformContext()); 2478 2475 ClearDOMCacheCallbackContext context(*this); … … 2481 2478 WKWebsiteDataStoreRemoveFetchCacheForOrigin(websiteDataStore, cacheOrigin.get(), &context, clearDOMCacheCallback); 2482 2479 runUntil(context.done, noTimeout); 2483 #endif2484 2480 } 2485 2481 2486 2482 void TestController::clearDOMCaches() 2487 2483 { 2488 #if PLATFORM(COCOA) && WK_API_ENABLED2489 2484 auto websiteDataStore = WKContextGetWebsiteDataStore(platformContext()); 2490 2485 ClearDOMCacheCallbackContext context(*this); … … 2492 2487 WKWebsiteDataStoreRemoveAllFetchCaches(websiteDataStore, &context, clearDOMCacheCallback); 2493 2488 runUntil(context.done, noTimeout); 2494 #endif2495 2489 } 2496 2490 … … 2830 2824 } 2831 2825 2832 #if !PLATFORM(COCOA)2833 void TestController::getAllStorageAccessEntries()2834 {2835 // FIXME: Implement C API version of this test.2836 }2837 #endif2838 2839 2826 } // namespace WTR
Note: See TracChangeset
for help on using the changeset viewer.