chromium/third_party/blink/web_tests/wpt_internal/digital-goods/resources/iframe-helper.html

<!DOCTYPE html>
<html>
<body>
  <script type="module">
  import './mock-digital-goods-service.js';

  window.onmessage = async message => {
    if (message.data !== 'Ready') {
      return;
    }

    try {
      await window.getDigitalGoodsService('https://example.com/billing');
      parent.postMessage('Success', '*');
    } catch (error) {
      parent.postMessage('Failure: ' + error.name + ': ' + error.message, '*');
    }
  };
</script>
</body>
</html>