Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1829d31df6800bb3b44ad1d8d1bea60fa604b5d0
      
https://github.com/WebKit/WebKit/commit/1829d31df6800bb3b44ad1d8d1bea60fa604b5d0
  Author: Roberto Rodriguez <[email protected]>
  Date:   2026-04-08 (Wed, 08 Apr 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M 
LayoutTests/http/tests/security/contentSecurityPolicy/script-src-strict-dynamic-and-script-src-elem-expected.txt
    M 
LayoutTests/http/tests/security/contentSecurityPolicy/script-src-strict-dynamic-and-script-src-elem.html

  Log Message:
  -----------
  Fix flaky test 
http/tests/security/contentSecurityPolicy/script-src-strict-dynamic-and-script-src-elem.html
https://bugs.webkit.org/show_bug.cgi?id=311709
rdar://174297450

Reviewed by Ryan Reno.

Layout test 
http/tests/security/contentSecurityPolicy/script-src-strict-dynamic-and-script-src-elem.html
creates a Worker whose script calls importScripts("post-message.js") followed 
by its own
postMessage("importScripts allowed"). Since post-message.js also calls 
postMessage("importScripts allowed"),
two identical messages are sent. The test only expected one, creating a race 
between notifyDone() and
the second message's delivery. This became flaky after 292030@main moved alert 
output from the injected
bundle (which had an isTestRunning() guard) to the UIProcess.

Fix by waiting for both messages before calling notifyDone() and expecting both 
alerts.

* LayoutTests/TestExpectations:
* 
LayoutTests/http/tests/security/contentSecurityPolicy/script-src-strict-dynamic-and-script-src-elem-expected.txt:
* 
LayoutTests/http/tests/security/contentSecurityPolicy/script-src-strict-dynamic-and-script-src-elem.html:

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



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

Reply via email to