er(listener);

    triggerMQLEvent(mql);
    await waitForChangesReported();
    assert_equals(calls, 1, "triggerMQLEvent");

    mql.dispatchEvent(new Event("change"));
    assert_equals(calls, 2, "dispatchEvent");
}, "removeListener doesn't remove listener added with addEventListener (capture)");

// See:
//   * https://github.com/whatwg/dom/issues/746
//   * https://bugzilla.mozilla.org/show_bug.cgi?id=1492446
//   * https://bugs.chromium.org/p/chromium/issues/detail?id=949432
promise_test(async t => {
 