  get handleEvent() {
            calls++;
            return getHandleEvent();
        },
    });

    const timeout = () => {
        return new Promise(resolve => {
            t.step_timeout(resolve, 0);
        });
    };

    const eventWatcher = new EventWatcher(t, window, "error", timeout);
    const errorPromise = eventWatcher.wait_for("error");

    target.dispatchEvent(new Event(type));

    const event = await errorPromise;
    assert_equals(calls, 1, "handleEvent property was not looked up");
 