testFetchClientReferrer", referrer: "FAILURE"}, "*");
        });

    // Test fetch() API with custom URL referrer.
    fetch("${location.origin}/common/security-features/subresource/xhr.py?name=URL",
        {referrer: "${location.href}/custom"})
      .then(r => r.json())
      .then(j => {
          top.postMessage({test: "testFetchURLReferrer", referrer: j.headers.referer}, "*")
        }).catch(e => {
          top.postMessage({test: "testFetchURLReferrer", referrer: "FAILURE"}, "*");
        });

   