d) {
    if (stalled)
        assert_equals(getComputedStyle(subject).borderColor, GREEN);
    else
        assert_not_equals(getComputedStyle(subject).borderColor, GREEN);
}

promise_test(async (t) => {
    const video = document.querySelector("video");
    assert_stalled_state(false);
    await new Promise((r) => {
        video.addEventListener("stalled", r, { once: true });
        video.src = `/media/counting.mp4?pipe=trickle(100:d1:r2)&random=${Math.random()}`;
    });
    assert_stalled_state(false);