Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MV3: Request content-script config on first tick #2325

Merged
merged 4 commits into from Nov 21, 2023

Conversation

sammacbeth
Copy link
Collaborator

@sammacbeth sammacbeth commented Nov 9, 2023

The navigator-interface test is often flakey on MV3. This seems to be because, on a slow machine, extension startup and content-script registration are slow. The means that we actually load the test page before the content-scripts are registered.

Now that we exposed MV3 content-script registration via a component, we can wait for that to complete before loading the test page.

@sammacbeth sammacbeth marked this pull request as ready for review November 9, 2023 11:45
@sammacbeth
Copy link
Collaborator Author

sammacbeth commented Nov 9, 2023

It seems this doesn't fully fix it - it looks like in some cases we're just too slow to get the config to C-S-S.

In the MV3 content-script, we're waiting for the secret from the page script before we request the config. We can do these things in parallel to reduce the overall latency to deliver the config to the page script.

@sammacbeth sammacbeth requested a review from kzar November 13, 2023 09:42
@sammacbeth sammacbeth changed the title MV3 tests: Wait for content-script registration to complete in navigator interface test MV3: Request content-script config on first tick Nov 17, 2023
@sammacbeth sammacbeth merged commit 5090c68 into duckduckgo:main Nov 21, 2023
24 checks passed
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.

None yet

2 participants