Bug 1729455 - Test that synchronization sources have a timestamp with the correct base. r=ng

Differential Revision: https://phabricator.services.mozilla.com/D128245
This commit is contained in:
Andreas Pehrson 2021-11-02 14:35:55 +00:00
Родитель bdd63e9323
Коммит f816c6f0c6
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -45,9 +45,12 @@
`Synchronization source audio level <= 1.0 (${source.audioLevel})`);
ok(source.timestamp,
`Synchronization source has timestamp (${source.timestamp})`);
ok(window.performance.now() + window.performance.timeOrigin -
source.timestamp < 2500, // This large value is used because sometimes
// the testing hardware is _very_ slow
const ageSeconds =
(window.performance.now() + window.performance.timeOrigin -
source.timestamp) / 1000;
ok(ageSeconds >= 0,
`Synchronization source timestamp is in the past`);
ok(ageSeconds < 2.5,
`Synchronization source timestamp is close to now`);
is(source.voiceActivityFlag, undefined,
"Synchronization source unsupported voiceActivity is undefined");