Bug 229766 - [Mac] imported/w3c/web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox-navigate.https.html is a flaky failure
Summary: [Mac] imported/w3c/web-platform-tests/html/cross-origin-opener-policy/coop-cs...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://github.com/web-platform-tests...
Keywords: InRadar
Depends on: 229838
Blocks:
  Show dependency treegraph
 
Reported: 2021-09-01 13:12 PDT by Eric Hutchison
Modified: 2021-09-03 09:15 PDT (History)
11 users (show)

See Also:


Attachments
Patch (3.66 KB, patch)
2021-09-03 07:30 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Hutchison 2021-09-01 13:12:06 PDT
imported/w3c/web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox-navigate.https.html

is a flaky failure on Mac.

History: https://results.webkit.org/?suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fcross-origin-opener-policy%2Fcoop-csp-sandbox-navigate.https.html&platform=mac

Results: https://build.webkit.org/results/Apple-BigSur-Debug-WK2-Tests/r281848%20(3536)/results.html

Diff:
--- /Volumes/Data/worker/bigsur-debug-tests-wk2/build/layout-test-results/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox-navigate.https-expected.txt
+++ /Volumes/Data/worker/bigsur-debug-tests-wk2/build/layout-test-results/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox-navigate.https-actual.txt
@@ -1,4 +1,4 @@
 
-PASS CSP: sandbox allow-popups allow-scripts allow-same-origin; CSP sandbox popup navigate to Cross-Origin-Opener-Policy document should work
-PASS CSP: sandbox allow-popups allow-scripts; CSP sandbox popup navigate to Cross-Origin-Opener-Policy document should work
+FAIL CSP: sandbox allow-popups allow-scripts allow-same-origin; CSP sandbox popup navigate to Cross-Origin-Opener-Policy document should work assert_unreached: Navigation from CSP sandbox to COOP document failed Reached unreachable code
+FAIL CSP: sandbox allow-popups allow-scripts; CSP sandbox popup navigate to Cross-Origin-Opener-Policy document should work assert_unreached: Navigation from CSP sandbox to COOP document failed Reached unreachable code

Reproduced on r281856 using run-webkit-tests- --debug --iterations 1000 -exit-after-n-failures 1 imported/w3c/web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox-navigate.https.html
Comment 1 Radar WebKit Bug Importer 2021-09-01 13:12:43 PDT
<rdar://problem/82642738>
Comment 2 Eric Hutchison 2021-09-01 13:18:36 PDT
Updated test expectations at https://trac.webkit.org/changeset/281869/webkit
Comment 3 Chris Dumez 2021-09-02 14:29:14 PDT
I was able to reproduce with the provided steps on ToT, thanks.
Comment 4 Chris Dumez 2021-09-02 14:30:27 PDT
The test has:
```
    addEventListener('load', t.step_func(() => {
      t.step_timeout(() => {
        assert_unreached('Navigation from CSP sandbox to COOP document failed')
      }, 1500);
    }));
```

Maybe the test runs slow that the timer fires before the load has completed.
Comment 6 Chris Dumez 2021-09-03 07:30:59 PDT
Created attachment 437269 [details]
Patch
Comment 7 EWS Watchlist 2021-09-03 07:39:24 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 8 EWS 2021-09-03 09:15:20 PDT
Committed r281999 (241306@main): <https://commits.webkit.org/241306@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 437269 [details].