Bug 228245 - [BigSur wk1 Release arm64] imported/w3c/web-platform-tests/workers/modules/shared-worker-import-csp.html is a flaky failure
Summary: [BigSur wk1 Release arm64] imported/w3c/web-platform-tests/workers/modules/sh...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-23 13:52 PDT by Eric Hutchison
Modified: 2021-09-15 12:13 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Hutchison 2021-07-23 13:52:42 PDT
imported/w3c/web-platform-tests/workers/modules/shared-worker-import-csp.html 

is a flaky failure on BigSur wk1 Release arm64 since test release on platform.

History: https://results.webkit.org/?suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fworkers%2Fmodules%2Fshared-worker-import-csp.html&platform=ios&platform=mac

Diff: 

--- /Volumes/Data/worker/bigsur-release-applesilicon-tests-wk1/build/layout-test-results/imported/w3c/web-platform-tests/workers/modules/shared-worker-import-csp-expected.txt
+++ /Volumes/Data/worker/bigsur-release-applesilicon-tests-wk1/build/layout-test-results/imported/w3c/web-platform-tests/workers/modules/shared-worker-import-csp-actual.txt
@@ -14,15 +14,4 @@
 CONSOLE MESSAGE: ReferenceError: Can't find variable: SharedWorker
 CONSOLE MESSAGE: ReferenceError: Can't find variable: SharedWorker
 CONSOLE MESSAGE: ReferenceError: Can't find variable: SharedWorker
-CONSOLE MESSAGE: ReferenceError: Can't find variable: SharedWorker
 
-FAIL worker-src 'self' directive should disallow cross origin static import. assert_array_equals: value is object "[object Object]", expected array
-FAIL worker-src * directive should allow cross origin static import. assert_array_equals: value is object "[object Object]", expected array
-FAIL script-src 'self' directive should disallow cross origin static import. assert_array_equals: value is object "[object Object]", expected array
-FAIL script-src * directive should allow cross origin static import. assert_array_equals: value is object "[object Object]", expected array
-FAIL worker-src * directive should override script-src 'self' directive and allow cross origin static import. assert_array_equals: value is object "[object Object]", expected array
-FAIL worker-src 'self' directive should override script-src * directive and disallow cross origin static import. assert_array_equals: value is object "[object Object]", expected array
-FAIL script-src 'self' directive should disallow cross origin dynamic import. assert_array_equals: value is object "[object Object]", expected array
-FAIL script-src * directive should allow cross origin dynamic import. assert_array_equals: value is object "[object Object]", expected array
-FAIL worker-src 'self' directive should not take effect on dynamic import. assert_array_equals: value is object "[object Object]", expected array
-

Reproduced using run-webkit-tests -1 --iterations 500 --exit-after-n-failures 2 -f imported/w3c/web-platform-tests/workers/modules/shared-worker-import-csp.html on r280247
Comment 1 Radar WebKit Bug Importer 2021-07-23 13:53:37 PDT
<rdar://problem/81034895>
Comment 2 Eric Hutchison 2021-07-23 14:01:18 PDT
Updated test expectations on https://trac.webkit.org/changeset/280257/webkit.
Comment 3 Chris Dumez 2021-09-15 12:13:12 PDT
Seems to have to do with the following code in LayoutTests/resources/testharnessreport.js:

```
// Wait for any other completion callbacks, which may eliminate test elements
// from the page and therefore reduce the output.
setTimeout(function () {
    testRunner.forceImmediateCompletion();
}, 0);
```

The 0 timer here seems to sometimes cause the test to finish before all the windows have closed (Test relies on `add_result_callback(() => win.close());`) and it affects the output.