Closed Bug 2094421 Opened 9 days ago Closed 3 days ago

test_midi_packet_timing_sorting.html fails when run twice in a row: "Received timestamp -2 should be greater than 0"

Categories

(Core :: DOM: Device Interfaces, task)

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

dom/midi/tests/test_midi_packet_timing_sorting.html fails on the second run in the mochitest-plain-repeat jobs (seen on macOS aarch64 opt).

The test MIDI device (TestMIDIPlatformService) stamps the packets it sends back up to 10ms in the past. event.timeStamp is relative to the document's time origin. When the test reaches send() quickly, the oldest packet's timestamp can be negative. The test starts its ordering check from lastTime = 0, so it wrongly requires the first timestamp to be positive.

The fix starts the check from -Infinity. The test still checks that the packets arrive in increasing timestamp order.

Blocks: 2095794

The test device stamps the packets up to 10ms in the past, which can be before the document's time origin when the test reaches send() quickly, giving a negative event.timeStamp.

Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c122902e174a https://hg.mozilla.org/integration/autoland/rev/835a7a7239d8 Don't assume the first MIDI packet in test_midi_packet_timing_sorting.html has a positive timestamp, r=webmidi-reviewers,gsvelto.
Status: ASSIGNED → RESOLVED
Closed: 3 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: