From cfb2e6aaa67ef2bf70a176ab9d0b3a6bdea1a437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A2ris=20Meuleman?= Date: Wed, 6 Jul 2022 08:10:16 -0700 Subject: [PATCH] Fix Sandbox WPT using a non-existing file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Another file that was using ./common/blank.html instead of an existing file. I also propose a fix for firefox behavior where it might not throw if the origin is checked synchronously, this by adding a timeout and trying again. Change-Id: I2ce8277d09d03b4be575315b0828a4a279dd7337 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3720219 Reviewed-by: Arthur Sonzogni Commit-Queue: Pâris Meuleman Cr-Commit-Position: refs/heads/main@{#1021191} --- ...t-to-blank-document-unsandboxed-frame.html | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/html/semantics/embedded-content/the-iframe-element/sandbox-inherit-to-blank-document-unsandboxed-frame.html b/html/semantics/embedded-content/the-iframe-element/sandbox-inherit-to-blank-document-unsandboxed-frame.html index 7040d07860eb47..0f35f2870940fb 100644 --- a/html/semantics/embedded-content/the-iframe-element/sandbox-inherit-to-blank-document-unsandboxed-frame.html +++ b/html/semantics/embedded-content/the-iframe-element/sandbox-inherit-to-blank-document-unsandboxed-frame.html @@ -1,3 +1,4 @@ + @@ -26,6 +27,12 @@ assert_false(msg.data.access_first_navigation_to_about_blank_throws, "Failed to access navigation to about:blank, it is probably sandboxed" ); + assert_false(msg.data.access_after_delay_initial_navigation_to_about_blank_throws, + "Failed to access navigation to about:blank, it is probably sandboxed" + ); + assert_false(msg.data.access_after_delay_first_navigation_to_about_blank_throws, + "Failed to access navigation to about:blank, it is probably sandboxed" + ); }, "Popup do not inherit sandbox, because of " + "'allow-popups-to-escape-sandbox'. The document isn't sandboxed.") @@ -36,8 +43,10 @@ " >