   target.removeEventListener(ename, logEventAndPhase, {capture:true});
      });

      assert_equals(event_log.toString(),
          expected_events_and_phases.toString(),
          "received events with phases");
    }, test_name);
  }

  for (let i = 0; i < targets.length; i++)
    addPromiseTest(targets.item(i));
</script>
