<!DOCTYPE html>
<meta charset="utf-8" />
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script>
  test_driver.set_test_context(parent);

  window.addEventListener("message", async (event) => {
    const {
      data: { action, data },
    } = event;
    const response = {};
    try {
      switch (action) {
        case "share":
          await test_driver.bless("share");
          await navigator.share(data);
          response.result = "unreached"