ndow, "nested iframe", "*"));
    });
    iframe.src = "resources/nested-iframe-1.html";
    document.body.appendChild(iframe);
  });
}, "postMessaging to a same-origin deeply-nested iframe allows them to instantiate");

promise_test(t => {
  return new Promise(resolve => {
    const w = window.open("resources/incrementer-popup.html");
    w.onload = t.step_func(() => {
      resolve(testSharingViaIncrementerScript(t, window, "window", w, "popup window", "*").then(() => {
        w.close();
      }));
    }