<!DOCTYPE html>
<meta charset="utf-8">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/utils.js"></script>

<body>
<script>
"use strict";
promise_test(async t => {
  // Generating a new one instead of hard-coding makes running tests manually a bit easier.
  const windowName = token();

  const code = `
    window.onload = () => opener.navigateMe();
    opener.postMessage("arrived at start URL", "*");
  `;

  const startURL = "res