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

Tentative test for memory cache behavior #32833

Closed
wants to merge 3 commits into from
Closed

Conversation

noamr
Copy link
Contributor

@noamr noamr commented Feb 14, 2022

See whatwg/html#6110

Checking different scenarios of memory cache, to see if browsers behave interoperably.

Using the following variants:

  • style/script/image/font
  • same-origin/no-cors/anonymous/use-credentials
  • default cache / no-store / max-age: 0

'use-credentials': {crossOrigin: true, attributes: {crossOrigin: 'use-credentials'}},
}

const loaders = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we reuse the existing loaders (maybe with modifications/additions)?

await remove();
else
t.add_cleanup(remove);
// await new Promise(resolve => t.step_timeout(resolve, 100));
Copy link
Contributor

Choose a reason for hiding this comment

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

leftover

// await new Promise(resolve => t.step_timeout(resolve, 100));
const remove2 = await loaders[as](href, configs[cfg2].attributes);
t.add_cleanup(remove2);
await new Promise(resolve => t.step_timeout(resolve, 100));
Copy link
Contributor

Choose a reason for hiding this comment

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

To reduce the chances of flakiness and the time it takes for these tests to run, it'd be better if for "discard" tests, we'd just use PerfObserver and not a timeout. For "reuse" tests, we don't have a choice, but for that case, I'm not sure if 100ms is enough. Maybe for that case, we can add another unrelated request, and check the results once that request returns? That way, we'd align the "timeout" with the server's responsiveness.

@plehegar plehegar removed their request for review March 25, 2022 19:33
@plehegar plehegar removed their assignment Mar 25, 2022
@noamr noamr closed this Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants