Repository navigation
fix: fixed clearing storage by origin in CDP - #8575
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🔵 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
aleks-pro
approved these changes
Nov 25, 2026
|
Installed this and it's working for my use case. thank you. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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