Skip to content

fix: fixed clearing storage by origin in CDP - #8575

Merged
Aleksey28 merged 2 commits into
DevExpress:masterfrom
Aleksey28:issue8573
Nov 25, 2026
Merged

Aleksey28 merged 2 commits into
DevExpress:masterfrom
Aleksey28:issue8573

Conversation

@Aleksey28

Copy link
Copy Markdown
Collaborator

closes #8573

Purpose

Describe the problem you want to address or the feature you want to implement.

Approach

Describe how your changes address the issue or implement the desired functionality in as much detail as possible.

References

Provide a link to the existing issue(s), if any.

Pre-Merge TODO

  • Write tests for your proposed changes
  • Make sure that existing tests do not fail

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Chrome 158 runtime validation is needed because mocked Storage.clearDataForOrigin tests cannot confirm that origin-scoped clearing fixes the startup hang while preserving localStorage/sessionStorage isolation across ports and windows.

No open issues 🎉

What changed in this PR

This PR replaces wildcard CDP storage clearing with per-origin cleanup in TestCafe’s native automation to address the Chrome startup hang reported in #8573.

Changes:

  • Tracks visited application origins across windows and browser restarts for each connection.
  • Clears tracked origins and the upcoming test page’s origin, logging failures and retaining failed origins for retry.
  • Adds storage-provider unit tests and skips one keyboard-focus regression case in native automation.
File Description
test/​server/​native-automation-storages-provider-test.js Tests origin selection, deduplication, invalid URLs, and failure retries.
test/​functional/​fixtures/​regression/​gh-4848/​test.js Skips “Straight order. Last” in native automation only.
src/​utils/​debug-loggers.ts Adds a storage-provider debug logger.
src/​native-automation/​visited-origins.ts Adds origin normalization and tracking.
src/​native-automation/​storages-provider.ts Replaces wildcard clearing with per-origin cleanup and retry tracking.
src/​native-automation/​request-pipeline/​index.ts Tracks document and frame origins while excluding service URLs.
src/​browser/​connection/​index.ts Maintains origin history for the connection lifetime and clears it on close.

Review effort: Balanced

@Christopher-C-Robinson

Copy link
Copy Markdown

Installed this and it's working for my use case. thank you.

@testcafe-need-response-bot testcafe-need-response-bot Bot added the STATE: Need response An issue that requires a response or attention from the team. label Nov 25, 2026
@Aleksey28
Aleksey28 merged commit 649941a into DevExpress:master Nov 25, 2026
21 checks passed
@testcafe-need-response-bot testcafe-need-response-bot Bot removed the STATE: Need response An issue that requires a response or attention from the team. label Nov 25, 2026

This branch was previously deployed

1 inactive deployment
CI — 57305efe Deployed Nov 25, 2026 by Aleksey28 via request-deploy #5085
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chrome 158: test never starts, browser stays on "Connected" loader; /browser/status request never gets a response (Chrome 157 works)

4 participants