-
Notifications
You must be signed in to change notification settings - Fork 10
Description
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