Skip to content

Commit 7f2d2ca

Browse files
[CSP] Reland tests for unsafe-eval allowing wasm (#31016)
This CL adds tests checking that Content-Security-Policy: script-src/default-src 'unsafe-eval' enable wasm. The test landed with https://crrev.com/c/3179051 but it was removed because of a conflict by https://crrev.com/c/3171519. Change-Id: I3ca75b9cec2b2e09c475c71093b5402776c93521 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3193990 Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Commit-Queue: Antonio Sartori <antoniosartori@chromium.org> Cr-Commit-Position: refs/heads/main@{#926268} Co-authored-by: Antonio Sartori <antoniosartori@chromium.org>
1 parent 5abf910 commit 7f2d2ca

4 files changed

+14
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// META: global=window,worker
2+
3+
promise_test(t => {
4+
return WebAssembly.instantiate(
5+
new Uint8Array([0, 0x61, 0x73, 0x6d, 0x1, 0, 0, 0]));
6+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Content-Security-Policy: default-src 'self' 'unsafe-inline' 'unsafe-eval'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// META: global=window,worker
2+
3+
promise_test(t => {
4+
return WebAssembly.instantiate(
5+
new Uint8Array([0, 0x61, 0x73, 0x6d, 0x1, 0, 0, 0]));
6+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Content-Security-Policy: script-src 'self' 'unsafe-inline' 'unsafe-eval'

0 commit comments

Comments
 (0)