From 1107415589a0bf23672b62a4f319de8d3502a5ab Mon Sep 17 00:00:00 2001 From: Yutaka Hirano Date: Mon, 6 Jun 2022 10:04:04 -0700 Subject: [PATCH] Fix wpt/html/.../window-domain-failure.https.sub.html self.SharedArrayBuffer is defined if and only if the environment is crossOriginIsolated. Fix the WPT accordingly. Bug: 1088220 Change-Id: If5ca273a9e513087b8fb192a18237d36ce54f2c8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3689131 Commit-Queue: Yutaka Hirano Reviewed-by: Domenic Denicola Cr-Commit-Position: refs/heads/main@{#1011058} --- .../resources/iframe-domain-failure.sub.html | 3 +- .../window-domain-failure.https.sub.html | 33 +++++++++++-------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-domain-failure.sub.html b/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-domain-failure.sub.html index 9fea70380547e12..0cdb8b5f5955b46 100644 --- a/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-domain-failure.sub.html +++ b/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-domain-failure.sub.html @@ -9,5 +9,6 @@ parent.postMessage({name: "domain", value: document.domain}, "*"); parent.postMessage( {name: "crossOriginIsolated", value: self.crossOriginIsolated}, "*"); -parent.postMessage(new SharedArrayBuffer(10), "*"); +parent.postMessage( + {name: "hasSharedArrayBuffer", value: Boolean(self.SharedArrayBuffer)}, "*"); diff --git a/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-failure.https.sub.html b/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-failure.https.sub.html index 2deff50d8dd9164..6fa196e094e9b5e 100644 --- a/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-failure.https.sub.html +++ b/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-failure.https.sub.html @@ -5,9 +5,7 @@ - -
- +