[macOS Sierra] Layout Test http/wpt/cache-storage/cache-put-keys.https.any.worker...
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2018 16:17:29 +0000 (16:17 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2018 16:17:29 +0000 (16:17 +0000)
commitc43401b146737702cf6a7e922ca75af5be55593c
treeb5c546d3affde126c70252c4d25d19d4e1a8677f
parent26afa1188662562e789c50d5571e3c0e5fc1b28e
[macOS Sierra] Layout Test http/wpt/cache-storage/cache-put-keys.https.any.worker.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=184204

Reviewed by Chris Dumez.

Source/WebKit:

NetworkCache::Storage by default limits the length to read to 1500 milliseconds.
This is good for the HTTP cache since networking might be faster.
It does not work for DOM cache which needs to get these resources even if it takes a long time.

Since this is disabled by a Mode::Testing option, use it for DOMCache after renaming it to Mode::AvoidRandomness.

Add a bunch of release logging to help debugging error cases.

* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
(WebKit::CacheStorage::Caches::retrieveOriginFromDirectory):
(WebKit::CacheStorage::Caches::initialize):
(WebKit::CacheStorage::Caches::writeCachesToDisk):
(WebKit::CacheStorage::Caches::readRecord):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::open):
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::Storage::shrinkIfNeeded):
* NetworkProcess/cache/NetworkCacheStorage.h:

LayoutTests:

* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/TestExpectations
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp
Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp
Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.h