Mark partitioned storage Clear-Site-Data test as long timeout [chromium/src : main]

0 views
Skip to first unread message

Steve Becker (Gerrit)

unread,
Jul 8, 2026, 4:13:50 PM (2 days ago) Jul 8
to Xiaohan Zhao, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, blink-...@chromium.org
Attention needed from Xiaohan Zhao

Steve Becker voted and added 1 comment

Votes added by Steve Becker

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Steve Becker . resolved

The long timeout looks worth a try, but let's remember to follow up to see if it helped. Most fetch web_tests run with a long timeout, many have some similar attributes to this test.

https://source.chromium.org/search?q=%22long%22&sq=&ss=chromium%2Fchromium%2Fsrc:third_party%2Fblink%2Fweb_tests%2Fhttp%2Ftests%2Ffetch%2F

If the timeout does not help, it looks like we can split the test into two or maybe three separate tests.

I'm also curious how the test works. How does the renderer in blink get notified about the clear-site-data to clear its dom storage cache?

Here's the relevant test code:

```
// Test that Clear-Site-Data deletes the local storage in this partition.
const resp = await fetch(
"/storage/resources/clear-site-data.php", {method: "GET"});
assert_equals(resp.status, 200);
var totalTime = 0;
// 2 second timeout.
while ((localStorage.length != 0) && (totalTime < 2000)) {
await timePasses(50);
totalTime += 50;
}
assert_equals(localStorage.length, 0);
```

https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/http/tests/storage/partitioned-storage/resources/clear-site-data-cross-site-frame.html;drc=b70f6e132cb94aad73b97cd62a56e086d573043e;l=34

Open in Gerrit

Related details

Attention is currently required from:
  • Xiaohan Zhao
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I3614d187128c183f22cb138888802ce5e526b0d7
Gerrit-Change-Number: 8061113
Gerrit-PatchSet: 1
Gerrit-Owner: Xiaohan Zhao <xiaoh...@microsoft.com>
Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
Gerrit-Reviewer: Xiaohan Zhao <xiaoh...@microsoft.com>
Gerrit-Attention: Xiaohan Zhao <xiaoh...@microsoft.com>
Gerrit-Comment-Date: Wed, 08 Jul 2026 20:13:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Steve Becker (Gerrit)

unread,
Jul 8, 2026, 4:14:12 PM (2 days ago) Jul 8
to Xiaohan Zhao, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, blink-...@chromium.org
Attention needed from Xiaohan Zhao

Steve Becker added 1 comment

Patchset-level comments
Steve Becker . unresolved

The long timeout looks worth a try, but let's remember to follow up to see if it helped. Most fetch web_tests run with a long timeout, many have some similar attributes to this test.

https://source.chromium.org/search?q=%22long%22&sq=&ss=chromium%2Fchromium%2Fsrc:third_party%2Fblink%2Fweb_tests%2Fhttp%2Ftests%2Ffetch%2F

If the timeout does not help, it looks like we can split the test into two or maybe three separate tests.

I'm also curious how the test works. How does the renderer in blink get notified about the clear-site-data to clear its dom storage cache?

Here's the relevant test code:

```
// Test that Clear-Site-Data deletes the local storage in this partition.
const resp = await fetch(
"/storage/resources/clear-site-data.php", {method: "GET"});
assert_equals(resp.status, 200);
var totalTime = 0;
// 2 second timeout.
while ((localStorage.length != 0) && (totalTime < 2000)) {
await timePasses(50);
totalTime += 50;
}
assert_equals(localStorage.length, 0);
```

https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/http/tests/storage/partitioned-storage/resources/clear-site-data-cross-site-frame.html;drc=b70f6e132cb94aad73b97cd62a56e086d573043e;l=34

Steve Becker

Flagging this as unresolved.

Open in Gerrit

Related details

Attention is currently required from:
  • Xiaohan Zhao
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I3614d187128c183f22cb138888802ce5e526b0d7
    Gerrit-Change-Number: 8061113
    Gerrit-PatchSet: 1
    Gerrit-Owner: Xiaohan Zhao <xiaoh...@microsoft.com>
    Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
    Gerrit-Reviewer: Xiaohan Zhao <xiaoh...@microsoft.com>
    Gerrit-Attention: Xiaohan Zhao <xiaoh...@microsoft.com>
    Gerrit-Comment-Date: Wed, 08 Jul 2026 20:13:59 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Steve Becker <ste...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Xiaohan Zhao (Gerrit)

    unread,
    5:31 AM (2 hours ago) 5:31 AM
    to Steve Becker, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, blink-...@chromium.org

    Xiaohan Zhao added 1 comment

    Patchset-level comments
    Steve Becker . resolved

    The long timeout looks worth a try, but let's remember to follow up to see if it helped. Most fetch web_tests run with a long timeout, many have some similar attributes to this test.

    https://source.chromium.org/search?q=%22long%22&sq=&ss=chromium%2Fchromium%2Fsrc:third_party%2Fblink%2Fweb_tests%2Fhttp%2Ftests%2Ffetch%2F

    If the timeout does not help, it looks like we can split the test into two or maybe three separate tests.

    I'm also curious how the test works. How does the renderer in blink get notified about the clear-site-data to clear its dom storage cache?

    Here's the relevant test code:

    ```
    // Test that Clear-Site-Data deletes the local storage in this partition.
    const resp = await fetch(
    "/storage/resources/clear-site-data.php", {method: "GET"});
    assert_equals(resp.status, 200);
    var totalTime = 0;
    // 2 second timeout.
    while ((localStorage.length != 0) && (totalTime < 2000)) {
    await timePasses(50);
    totalTime += 50;
    }
    assert_equals(localStorage.length, 0);
    ```

    https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/http/tests/storage/partitioned-storage/resources/clear-site-data-cross-site-frame.html;drc=b70f6e132cb94aad73b97cd62a56e086d573043e;l=34

    Steve Becker

    Flagging this as unresolved.

    Xiaohan Zhao

    Thank! I'll keep an eye on whether the long timeout helps.
    For the renderer notification path, I traced it as:
    `clear-site-data.php` sets `Clear-Site-Data: "storage"`.
    `ClearSiteDataHandler::Run()` nparses that and calls `ExecuteClearingTask()`.
    `ClearSiteDataHandler::ExecuteClearingTask()` calls `ClearSiteData()`.
    `SiteDataClearer::RunAndDestroySelfWhenDone()` adds `BrowsingDataRemover::DATA_TYPE_DOM_STORAGE` for `ClearSiteDataType::kStorage`, then calls `RemoveWithFilterAndReply()`.
    For an already-open localStorage area, this eventually reaches `LocalStorageImpl::DeleteStorage()`, which calls `StorageAreaImpl::DeleteAll()`.
    `StorageAreaImpl::DeleteAll()` sends `AllDeleted()` to its registered `StorageAreaObserver`s.
    Blink's `CachedStorageArea` is registered as a `StorageAreaObserver`, and `CachedStorageArea::AllDeleted()` clears the renderer-side cache.
    So I think this test is waiting for that async deletion and observer callback to make it back to the frame.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I3614d187128c183f22cb138888802ce5e526b0d7
      Gerrit-Change-Number: 8061113
      Gerrit-PatchSet: 1
      Gerrit-Owner: Xiaohan Zhao <xiaoh...@microsoft.com>
      Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
      Gerrit-Reviewer: Xiaohan Zhao <xiaoh...@microsoft.com>
      Gerrit-Comment-Date: Fri, 10 Jul 2026 09:30:50 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages