Changeset 265035 in webkit


Ignore:
Timestamp:
Jul 29, 2020 1:45:12 AM (4 years ago)
Author:
youenn@apple.com
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.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r265032 r265035  
     12020-07-29  Youenn Fablet  <youenn@apple.com>
     2
     3        TestWebKitAPI.WebKit.QuotaDelegate flaky times out
     4        https://bugs.webkit.org/show_bug.cgi?id=214842
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Add some release logging.
     9
     10        * UIProcess/Network/NetworkProcessProxy.cpp:
     11        (WebKit::NetworkProcessProxy::requestStorageSpace):
     12
    1132020-07-29  Carlos Garcia Campos  <cgarcia@igalia.com>
    214
  • trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp

    r264356 r265035  
    13711371void 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)
    13721372{
     1373    RELEASE_LOG(Storage, "%p - NetworkProcessProxy::requestStorageSpace", this);
    13731374    auto* store = websiteDataStoreFromSessionID(sessionID);
    13741375
     
    13901391
    13911392        WebPageProxy::forMostVisibleWebPageIfAny(sessionID, origin.topOrigin, [completionHandler = WTFMove(completionHandler), origin, currentQuota, currentSize, spaceRequired](auto* page) mutable {
     1393            RELEASE_LOG(Storage, "NetworkProcessProxy::requestStorageSpace trying to get a visible page: %d", !!page);
    13921394            if (!page) {
    13931395                completionHandler({ });
  • trunk/Tools/ChangeLog

    r265025 r265035  
     12020-07-29  Youenn Fablet  <youenn@apple.com>
     2
     3        TestWebKitAPI.WebKit.QuotaDelegate flaky times out
     4        https://bugs.webkit.org/show_bug.cgi?id=214842
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm:
     9        In case the page is not visible, quota increase delegate will be denied.
     10        Delay the cache storage hence the quota increase until the page is visible.
     11
    1122020-07-28  Dean Jackson  <dino@apple.com>
    213
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm

    r264837 r265035  
    153153    }
    154154}
    155 doTest();
     155
     156window.onload = () => {
     157    if (document.visibilityState === 'visible')
     158        doTest();
     159    else {
     160        document.addEventListener("visibilitychange", function() {
     161            if (document.visibilityState === 'visible')
     162                doTest();
     163        });
     164    }
     165}
    156166
    157167function doTestAgain()
     
    230240    setVisible(webView1.get());
    231241
    232     NSLog(@"QuotaDelegate 1");
    233 
    234242    receivedQuotaDelegateCalled = false;
    235243    [webView1 loadRequest:server.request()];
    236244    Util::run(&receivedQuotaDelegateCalled);
    237 
    238     NSLog(@"QuotaDelegate 2");
    239245
    240246    auto webView2 = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get() addToWindow:YES]);
     
    248254    Util::run(&receivedMessage);
    249255
    250     NSLog(@"QuotaDelegate 3");
    251 
    252256    EXPECT_FALSE(delegate2.get().quotaDelegateCalled);
    253257    [delegate1 grantQuota];
     
    257261    Util::run(&receivedMessage);
    258262
    259     NSLog(@"QuotaDelegate 4");
    260 
    261263    while (!delegate2.get().quotaDelegateCalled)
    262264        TestWebKitAPI::Util::sleep(0.1);
    263 
    264     NSLog(@"QuotaDelegate 5");
    265265
    266266    [delegate2 denyQuota];
Note: See TracChangeset for help on using the changeset viewer.