

    for (var i = 0; i < targets.length; i++) {
        targets[i].addEventListener(event_type, test_event);
    }

    var evt = document.createEvent("Event");
    evt.initEvent(event_type, true, true);

    target.dispatchEvent(evt);

    for (var i = 0; i < targets.length; i++) {
        targets[i].removeEventListener(event_type, test_event);
    }

    target.dispatchEvent(evt);

    assert_array_equals(actual_targets, targets, "targets");
    assert_array_equals(actual_phases, phases, "phases");
}, "E