 = resolve;
      });
      script.src = url;
      document.body.appendChild(script);
      return loaded;
    }
    function add_iframe(url) {
      return new Promise(function (resolve) {
        var frame = document.createElement('iframe');
        frame.src = url;
        frame.onload = function () { resolve(frame); };
        document.body.appendChild(frame);
      });
    }
    promise_test(async t => {
      // Add unique token to url so that each run the url is different to avoid
      // flakiness