Title: [265035] trunk
- Revision
- 265035
- Author
- [email protected]
- Date
- 2020-07-29 01:45:12 -0700 (Wed, 29 Jul 2020)
Log Message
TestWebKitAPI.WebKit.QuotaDelegate flaky times out
https://bugs.webkit.org/show_bug.cgi?id=214842
Reviewed by Geoffrey Garen.
Source/WebKit:
Add some release logging.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::requestStorageSpace):
Tools:
* TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm:
In case the page is not visible, quota increase delegate will be denied.
Delay the cache storage hence the quota increase until the page is visible.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (265034 => 265035)
--- trunk/Source/WebKit/ChangeLog 2020-07-29 08:32:59 UTC (rev 265034)
+++ trunk/Source/WebKit/ChangeLog 2020-07-29 08:45:12 UTC (rev 265035)
@@ -1,3 +1,15 @@
+2020-07-29 Youenn Fablet <[email protected]>
+
+ TestWebKitAPI.WebKit.QuotaDelegate flaky times out
+ https://bugs.webkit.org/show_bug.cgi?id=214842
+
+ Reviewed by Geoffrey Garen.
+
+ Add some release logging.
+
+ * UIProcess/Network/NetworkProcessProxy.cpp:
+ (WebKit::NetworkProcessProxy::requestStorageSpace):
+
2020-07-29 Carlos Garcia Campos <[email protected]>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.29.4 release
Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (265034 => 265035)
--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2020-07-29 08:32:59 UTC (rev 265034)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2020-07-29 08:45:12 UTC (rev 265035)
@@ -1370,6 +1370,7 @@
void NetworkProcessProxy::requestStorageSpace(PAL::SessionID sessionID, const WebCore::ClientOrigin& origin, uint64_t currentQuota, uint64_t currentSize, uint64_t spaceRequired, CompletionHandler<void(Optional<uint64_t> quota)>&& completionHandler)
{
+ RELEASE_LOG(Storage, "%p - NetworkProcessProxy::requestStorageSpace", this);
auto* store = websiteDataStoreFromSessionID(sessionID);
if (!store) {
@@ -1389,6 +1390,7 @@
}
WebPageProxy::forMostVisibleWebPageIfAny(sessionID, origin.topOrigin, [completionHandler = WTFMove(completionHandler), origin, currentQuota, currentSize, spaceRequired](auto* page) mutable {
+ RELEASE_LOG(Storage, "NetworkProcessProxy::requestStorageSpace trying to get a visible page: %d", !!page);
if (!page) {
completionHandler({ });
return;
Modified: trunk/Tools/ChangeLog (265034 => 265035)
--- trunk/Tools/ChangeLog 2020-07-29 08:32:59 UTC (rev 265034)
+++ trunk/Tools/ChangeLog 2020-07-29 08:45:12 UTC (rev 265035)
@@ -1,3 +1,14 @@
+2020-07-29 Youenn Fablet <[email protected]>
+
+ TestWebKitAPI.WebKit.QuotaDelegate flaky times out
+ https://bugs.webkit.org/show_bug.cgi?id=214842
+
+ Reviewed by Geoffrey Garen.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm:
+ In case the page is not visible, quota increase delegate will be denied.
+ Delay the cache storage hence the quota increase until the page is visible.
+
2020-07-28 Dean Jackson <[email protected]>
run-minibrowser doesn't respect webkit configuration
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm (265034 => 265035)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm 2020-07-29 08:32:59 UTC (rev 265034)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm 2020-07-29 08:45:12 UTC (rev 265035)
@@ -152,8 +152,18 @@
window.webkit.messageHandlers.qt.postMessage("fail with exception " + e);
}
}
-doTest();
+window._onload_ = () => {
+ if (document.visibilityState === 'visible')
+ doTest();
+ else {
+ document.addEventListener("visibilitychange", function() {
+ if (document.visibilityState === 'visible')
+ doTest();
+ });
+ }
+}
+
function doTestAgain()
{
doTest();
@@ -229,14 +239,10 @@
[webView1 setUIDelegate:delegate1.get()];
setVisible(webView1.get());
- NSLog(@"QuotaDelegate 1");
-
receivedQuotaDelegateCalled = false;
[webView1 loadRequest:server.request()];
Util::run(&receivedQuotaDelegateCalled);
- NSLog(@"QuotaDelegate 2");
-
auto webView2 = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get() addToWindow:YES]);
auto delegate2 = adoptNS([[QuotaDelegate alloc] init]);
[webView2 setUIDelegate:delegate2.get()];
@@ -247,8 +253,6 @@
[messageHandler setExpectedMessage: @"start"];
Util::run(&receivedMessage);
- NSLog(@"QuotaDelegate 3");
-
EXPECT_FALSE(delegate2.get().quotaDelegateCalled);
[delegate1 grantQuota];
@@ -256,13 +260,9 @@
receivedMessage = false;
Util::run(&receivedMessage);
- NSLog(@"QuotaDelegate 4");
-
while (!delegate2.get().quotaDelegateCalled)
TestWebKitAPI::Util::sleep(0.1);
- NSLog(@"QuotaDelegate 5");
-
[delegate2 denyQuota];
[messageHandler setExpectedMessage: @"fail"];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes