chromium/third_party/blink/web_tests/external/wpt/content-security-policy/support/dedicated-worker-helper.js

var url = new URL("../support/ping.js", document.baseURI).toString();
if (document.getElementById("foo").hasAttribute("blocked-worker"))
  assert_worker_is_blocked(url, document.getElementById("foo").getAttribute("data-desc-fallback"));
else
  assert_worker_is_loaded(url, document.getElementById("foo").getAttribute("data-desc-fallback"));