1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24

content / test / data / prerender / purpose_prefetch_header.html [blame]

<!DOCTYPE html>
<body>
<script src="test_utils.js"></script>
<script>

async function run(tag) {
  // Fetch resources during prerendering.
  const iframe =
      await create_iframe(`purpose_prefetch_header_iframe.html?${tag}`);
  await create_img(`missing.jpg?${tag}`);
  await fetch(`missing.txt?${tag}`);

  // Fetch resources in the iframe during prerendering.
  await iframe.contentWindow.create_iframe(`../empty.html?${tag}`);
  await iframe.contentWindow.create_img(`iframe-missing.jpg?${tag}`);
  await iframe.contentWindow.fetch(`iframe-missing.txt?${tag}`);
}

async function request(url) {
  await fetch(url, { mode: 'cors' });
}

</script>
</body>