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

Headers required for SharedArrayBuffer tests #92

Open
JohnRiv opened this issue Nov 27, 2024 · 0 comments
Open

Headers required for SharedArrayBuffer tests #92

JohnRiv opened this issue Nov 27, 2024 · 0 comments
Assignees

Comments

@JohnRiv
Copy link
Collaborator

JohnRiv commented Nov 27, 2024

In order for SharedArrayBuffer to be available, the main document must include these 2 response headers:

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

WPT has the ability to manually add headers for a specific test page via a .headers file. Information about that is here: https://web-platform-tests.org/writing-tests/server-features.html#tests-requiring-special-headers

If we are able to leverage that for our ECMAScript tests that we run within WPT, that is likely the easiest way to test SharedArrayBuffer. Here's an example .headers file for that: https://github.com/web-platform-tests/wpt/blob/master/encoding/sharedarraybuffer.https.html.headers

Note: unfortunately, currently none of the WPT tests that leverage SharedArrayBuffer currently pass in all 4 browsers for various reasons, but a quick test of the test262 web test runner when manually overriding the headers to include those 2 passed in Chrome for me, so I'm hopeful this approach could work

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

No branches or pull requests

3 participants