From 97c92fd3b5ebf893fafba81074008374a9af5713 Mon Sep 17 00:00:00 2001 From: Antonio Sartori Date: Sat, 24 Apr 2021 09:19:25 +0000 Subject: [PATCH] Bug 1706884 [wpt PR 28637] - Make web test for SAB in IndexedDB a WPT, a=testonly Automatic update from web-platform-tests Make web test for SAB in IndexedDB a WPT The web_test checking that a SharedArrayBuffer cannot be serialized into IndexedDB was failing because it was served inside a non-cross-origin-isolated page, which could not create a SharedArrayBuffer. This CL turns that into a Web Platform Test and adds the appropriate COOP and COEP header which make the page cross-origin-isolated, enabling instantiation of SharedArrayBuffer. Bug: 1194557 Change-Id: I6854a76612d237b82cb020e317459157907e77f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2846500 Reviewed-by: Arthur Sonzogni Commit-Queue: Antonio Sartori Cr-Commit-Position: refs/heads/master@{#875562} -- wpt-commits: f1709df56f753c1932c4dd7969643fac1973265f wpt-pr: 28637 --- ...ialize-sharedarraybuffer-throws.https.html | 28 +++++++++++++++++++ ...haredarraybuffer-throws.https.html.headers | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html create mode 100644 testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html.headers diff --git a/testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html b/testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html new file mode 100644 index 000000000000..6900759f4412 --- /dev/null +++ b/testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html @@ -0,0 +1,28 @@ + +IndexedDB: Attempting to serialize a SharedArrayBuffer should throw + + + + diff --git a/testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html.headers b/testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html.headers new file mode 100644 index 000000000000..5f8621ef8366 --- /dev/null +++ b/testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html.headers @@ -0,0 +1,2 @@ +Cross-Origin-Embedder-Policy: require-corp +Cross-Origin-Opener-Policy: same-origin