<!DOCTYPE html>
<html>
<head>
<script src='../resources/runner.js'></script>
</head>
<body>
<script>
let isDone = false;
function testDone() {
  isDone = true;
}

function addIframe(url) {
  return new Promise((resolve) => {
    var frame = document.createElement('iframe');
    frame.src = url;
    frame.onload = () => { resolve(frame); };
    document.body.appendChild(frame);
  });
}

function waitForWorkerActive(worker) {
  return new Promise((resolve) => {
    worker.addEventListener('statechange', () =>