Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fff9c1acbb11bcf9542fb6e3512856fc9ac03afd
      
https://github.com/WebKit/WebKit/commit/fff9c1acbb11bcf9542fb6e3512856fc9ac03afd
  Author: Anthony Tarbinian <[email protected]>
  Date:   2026-05-19 (Tue, 19 May 2026)

  Changed paths:
    M LayoutTests/http/tests/security/cross-origin-blob-transfer-expected.txt
    M LayoutTests/http/tests/security/cross-origin-blob-transfer.html

  Log Message:
  -----------
  [Site Isolation] http/tests/security/cross-origin-blob-transfer.html is flaky 
on post-commit CI bots
https://bugs.webkit.org/show_bug.cgi?id=315056
rdar://177382438

Reviewed by Sihui Liu and Anne van Kesteren.

http/tests/security/cross-origin-blob-transfer.html is flaky on macOS site 
isolation bots with the following diff:

```
--- 
/Volumes/Data/worker/Apple-Tahoe-Release-WK2-Site-Isolation-Tree-Tests/build/layout-test-results/http/tests/security/cross-origin-blob-transfer-expected.txt
+++ 
/Volumes/Data/worker/Apple-Tahoe-Release-WK2-Site-Isolation-Tree-Tests/build/layout-test-results/http/tests/security/cross-origin-blob-transfer-actual.txt
@@ -2,16 +2,4 @@

 TEST COMPLETE

-Summary
-
-Harness status: OK
-
-Found 1 tests
-
-1 Pass
-Details
-
-Result Test Name       Message
-Pass   Test for creating blob in iframe and then transferring it cross-origin.
-Asserts run
-
+Running, 1 complete, 0 remain
```

This failure happens since the test uses both testharness and WKTR to indicate 
when the test is complete:
```
  window.addEventListener("message", (e) => {
      e.data.text().then(t => {
          assert_equals(t, "Blob content")
          test.done();                      // (A) testharness completion
          if (self.testRunner)
              testRunner.notifyDone();      // (B) WKTR completion
      });
  });
```

This leads to a potential race where the DOM gets dumped (B) before 
testharness's timer
(A) gets a chance to render the summary table. The dump captures only the 
in-progress
Running, 1 complete, 0 remain status line that testharness writes during the 
test.

This patch updates the test to only use the functionality exposed by 
testharness.js.
I removed the explicit call to testRunner.notifyDone() and the usage of 
js-test-pre/post.js
(which also called testRunner.notifyDone()), load testharnessreport.js,
and use t.step_func and t.step_func_done so the harness owns completion.
testharnessreport.js calls testRunner.notifyDone() from add_completion_callback,
which fires only after testharness has fully finished, eliminating the race.
testharnessreport.js also calls setup({output: false}), so the verbose
<table> summary is no longer emitted (updated -expected.txt to the single PASS 
line).

This patch is a speculative fix to attempt to fix
http/tests/security/cross-origin-blob-transfer.html
from failing flakily with site isolation.

* LayoutTests/http/tests/security/cross-origin-blob-transfer-expected.txt:
* LayoutTests/http/tests/security/cross-origin-blob-transfer.html:

Canonical link: https://commits.webkit.org/313508@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to