const mql = await createMQL(t);

    let called = 0;
    const listener = () => {
        called++;
    };

    mql.addListener(listener);
    mql.addListener(listener);

    triggerMQLEvent(mql);
    await waitForChangesReported();

    assert_equals(called, 1);
}, "listener that was added twice is called only once");

promise_test(async t => {
    const iframe = await createIFrame(t, 100);
    const media = `(min-width: 200px)`;

    const mql1 = iframe.contentWindow.matchMedia(media);
    const mql2 = if