Skip to content

Headers required for SharedArrayBuffer tests #92

@JohnRiv

Description

@JohnRiv

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions