chromium/content/test/data/service_worker/fetch_cross_origin.html

<!DOCTYPE html>
<html>
<head>
<title>INITIAL</title>
<script>
var queryString = location.search;

if (queryString && queryString.charAt(0) === '?') {
  // Fetches the URL provided in query string with a custom header.
  fetch(queryString.substring(1), {headers: {'X-Custom-Header': 'foo'}})
    .then(data => data.text())
    .then(text => document.title = text)
    .catch(() => document.title = 'FAIL');
}
</script>
</head>
</html>