Storage Access API: Call completion handlers in NetworkConnectionToWebProcess::hasSto...
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 May 2019 23:33:39 +0000 (23:33 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 May 2019 23:33:39 +0000 (23:33 +0000)
commitc71ca17ed3cff24c36513c9d2b434a9a094d4596
treefceecc0f27dde5444872c34da238e44f252745eb
parentaa732f530ee1c43f3067e0b9e5cf87233a3932bd
Storage Access API: Call completion handlers in NetworkConnectionToWebProcess::hasStorageAccess() and NetworkConnectionToWebProcess::requestStorageAccess() when feature is off
https://bugs.webkit.org/show_bug.cgi?id=197967
<rdar://problem/50753129>

Reviewed by Brent Fulgham.

Source/WebKit:

NetworkConnectionToWebProcess::hasStorageAccess() and NetworkConnectionToWebProcess::requestStorageAccess()
should call their completion handlers when there is no Resource Load Statistics object, i.e. when Resource
Load Statistics is off. This happens for ephemeral sessions which made code for federated login providers
hang, waiting for the result to document.hasStorageAccess().

The existing layout test case was augmented to use an ephemeral session.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::hasStorageAccess):
(WebKit::NetworkConnectionToWebProcess::requestStorageAccess):

LayoutTests:

* http/tests/storageAccess/has-storage-access-true-if-feature-off.html:
* platform/mac-wk2/TestExpectations:
    Test case marked as [ Pass ].

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245427 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/storageAccess/has-storage-access-true-if-feature-off.html
LayoutTests/platform/mac-wk2/TestExpectations
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp