Bug 1415283 - Increase timeout for tone events in RTCDTMFSender-helper.js; r?jgraham
With the current value of 150 milliseconds we get intermittent timeouts on our
test infrastructure. We are missing by only a small amount, e.g. 6 milliseconds
in
Bug 1415283, but it seems safer to increase the timeout to 250 milliseconds so
that we don't end up revisiting this problem in the future.
This also fixes the error message to say milliseconds rather than seconds.
MozReview-Commit-ID: CqjTKZn33q8
--- a/testing/web-platform/tests/webrtc/RTCDTMFSender-helper.js
+++ b/testing/web-platform/tests/webrtc/RTCDTMFSender-helper.js
@@ -71,18 +71,18 @@ function test_tone_change_events(testFun
`Expect current event.tone to be ${expectedTone}`);
assert_equals(dtmfSender.toneBuffer, expectedToneBuffer,
`Expect dtmfSender.toneBuffer to be updated to ${expectedToneBuffer}`);
const now = Date.now();
const duration = now - lastEventTime;
- assert_approx_equals(duration, expectedDuration, 150,
- `Expect tonechange event for "${tone}" to be fired approximately after ${expectedDuration} seconds`);
+ assert_approx_equals(duration, expectedDuration, 250,
+ `Expect tonechange event for "${tone}" to be fired approximately after ${expectedDuration} milliseconds`);
lastEventTime = now;
if(toneChanges.length === 0) {
// Wait for same duration as last expected duration + 100ms
// before passing test in case there are new tone events fired,
// in which case the test should fail.
t.step_timeout(