Title: [284817] trunk/LayoutTests
Revision
284817
Author
[email protected]
Date
2021-10-25 12:30:14 -0700 (Mon, 25 Oct 2021)

Log Message

Regression (r284610): [ iOS BigSur wk2 ] http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html is failing
https://bugs.webkit.org/show_bug.cgi?id=232151
<rdar://problem/84552682>

Unreviewed follow-up to r284723 since the test is still flaky on iOS.

* TestExpectations:
* http/tests/security/resources/anchor-tag-with-blank-target.html:
* http/tests/security/resources/page-executing-_javascript_.html:
* http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox-expected.txt:
* http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (284816 => 284817)


--- trunk/LayoutTests/ChangeLog	2021-10-25 19:25:26 UTC (rev 284816)
+++ trunk/LayoutTests/ChangeLog	2021-10-25 19:30:14 UTC (rev 284817)
@@ -1,3 +1,17 @@
+2021-10-25  Chris Dumez  <[email protected]>
+
+        Regression (r284610): [ iOS BigSur wk2 ] http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html is failing
+        https://bugs.webkit.org/show_bug.cgi?id=232151
+        <rdar://problem/84552682>
+
+        Unreviewed follow-up to r284723 since the test is still flaky on iOS.
+
+        * TestExpectations:
+        * http/tests/security/resources/anchor-tag-with-blank-target.html:
+        * http/tests/security/resources/page-executing-_javascript_.html:
+        * http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox-expected.txt:
+        * http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html:
+
 2021-10-25  Ayumi Kojima  <[email protected]>
 
         [ iOS 15 ] imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker.html is flaky timing out.

Modified: trunk/LayoutTests/TestExpectations (284816 => 284817)


--- trunk/LayoutTests/TestExpectations	2021-10-25 19:25:26 UTC (rev 284816)
+++ trunk/LayoutTests/TestExpectations	2021-10-25 19:30:14 UTC (rev 284817)
@@ -409,6 +409,7 @@
 imported/w3c/web-platform-tests/server-timing/navigation_timing_idl.https.html [ Skip ]
 
 # Console log lines may appear in a different order so we silence them.
+http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html [ DumpJSConsoleLogInStdErr ]
 http/wpt/html/cross-origin-embedder-policy/require-corp.https.html [ DumpJSConsoleLogInStdErr ]
 imported/w3c/web-platform-tests/eventsource/format-utf-8.htm [ DumpJSConsoleLogInStdErr ]
 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html [ DumpJSConsoleLogInStdErr Failure Pass ]
@@ -5183,4 +5184,4 @@
 imported/w3c/web-platform-tests/css/motion/offset-rotate-005.html [ ImageOnlyFailure ]
 
 # IPC test failing in Debug mode due to assert.
-[ Debug ] ipc/send-invalid-message.html [ Skip ]
\ No newline at end of file
+[ Debug ] ipc/send-invalid-message.html [ Skip ]

Modified: trunk/LayoutTests/http/tests/security/resources/anchor-tag-with-blank-target.html (284816 => 284817)


--- trunk/LayoutTests/http/tests/security/resources/anchor-tag-with-blank-target.html	2021-10-25 19:25:26 UTC (rev 284816)
+++ trunk/LayoutTests/http/tests/security/resources/anchor-tag-with-blank-target.html	2021-10-25 19:30:14 UTC (rev 284817)
@@ -3,6 +3,6 @@
 <head>
 </head>
 <body>
-    <a id="theLink" target="_blank" href="" page that executes _javascript_</a>
+    <a id="theLink" target="_blank" rel="opener" href="" page that executes _javascript_</a>
 </body>
 </html>

Modified: trunk/LayoutTests/http/tests/security/resources/page-executing-_javascript_.html (284816 => 284817)


--- trunk/LayoutTests/http/tests/security/resources/page-executing-_javascript_.html	2021-10-25 19:25:26 UTC (rev 284816)
+++ trunk/LayoutTests/http/tests/security/resources/page-executing-_javascript_.html	2021-10-25 19:30:14 UTC (rev 284817)
@@ -4,6 +4,7 @@
 <noscript>Pass: _javascript_ was not allowed to execute.</noscript>
 <p id="output"></p>
 <script>
+    opener.didRunScriptInPopup = true;
     document.getElementById("output").innerHTML = "Fail: _javascript_ was allowed to execute.";
 </script>
 </body>

Modified: trunk/LayoutTests/http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox-expected.txt (284816 => 284817)


--- trunk/LayoutTests/http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox-expected.txt	2021-10-25 19:25:26 UTC (rev 284816)
+++ trunk/LayoutTests/http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox-expected.txt	2021-10-25 19:30:14 UTC (rev 284817)
@@ -1,2 +1,10 @@
-CONSOLE MESSAGE: Blocked script execution in 'http://127.0.0.1:8000/security/resources/page-executing-_javascript_.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
+Tests that windows created from a sandboxed context inherit the same sandbox
 
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS iframeContentWindow.didRunScriptInPopup is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Modified: trunk/LayoutTests/http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html (284816 => 284817)


--- trunk/LayoutTests/http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html	2021-10-25 19:25:26 UTC (rev 284816)
+++ trunk/LayoutTests/http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html	2021-10-25 19:30:14 UTC (rev 284817)
@@ -2,36 +2,23 @@
 <html>
 <head>
     <meta charset="UTF-8">
-    <title>Tests that windows created from a sandboxed context inherit the same sandbox</title>
-    <script src=""
+    <script src=""
 </head>
 <body>
 <script>
-    if (window.testRunner) {
-        testRunner.waitUntilDone();
-        testRunner.dumpAsText();
-    }
+    description("Tests that windows created from a sandboxed context inherit the same sandbox");
+    jsTestIsAsync = true;
 
-    function wrapUp () {
-        if (window.testRunner) {
-            testRunner.notifyDone();
-        }
-    }
-
     function run() {
-        var iframeContentDocument = document.getElementById("theIframe").contentDocument,
-            theLink = iframeContentDocument.getElementById("theLink"),
-            clickEvent = document.createEvent("HTMLEvents");
-        clickEvent.initEvent("click", true, true);
-        theLink.dispatchEvent(clickEvent);
+        iframeContentWindow = document.getElementById("theIframe").contentWindow;
+        iframeContentWindow.didRunScriptInPopup = false;
+        let iframeContentDocument = document.getElementById("theIframe").contentDocument;
+        iframeContentDocument.getElementById("theLink").click();
 
-        var iframeContentWindow = document.getElementById("theIframe").contentWindow;
-        if (iframeContentWindow.internals) {
-            iframeContentWindow.internals.setConsoleMessageListener((msg) => {
-                setTimeout(wrapUp, 0);
-            });
-        } else
-            setTimeout(wrapUp, 1000);
+        setTimeout(() => {
+            shouldBeFalse("iframeContentWindow.didRunScriptInPopup");
+            finishJSTest();
+        }, 500);
     }
 </script>
 <iframe _onload_="run()" id="theIframe" sandbox="allow-same-origin allow-popups" src=""
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to