e(resolve => worker.port.onmessage = resolve);

    const expectedCookieValue = DetermineExpectedCookieValue(options, config);
    assert_equals(msg_event.data, expectedCookieValue);
  }, description);
}

function init() {
  // Same-origin cookie is set up in the .headers file in this directory.
  promise_test(async () => {
    return fetch(
      `${host_info.HTTP_REMOTE_ORIGIN}/cookies/resources/set-cookie.py?name=COOKIE_NAME&path=/workers/modules/`,
      {
        mode: 'no-cors',
        credentials: '