Bug 1432761 - check for audioLevel when it is present in mochitest draft
authorNico Grunbaum
Tue, 06 Feb 2018 22:34:14 -0800
changeset 751942 6db5b90cb5325c33827519bb4021f7da1a3992cd
parent 751476 f1a4b64f19b0e93c49492735db30a5023e624ae7
push id98096
push userna-g@nostrum.com
push dateWed, 07 Feb 2018 06:34:44 +0000
bugs1432761
milestone60.0a1
Bug 1432761 - check for audioLevel when it is present in mochitest MozReview-Commit-ID: BhRwEY85wb3
dom/media/tests/mochitest/test_peerConnection_audioSynchronizationSources.html
--- a/dom/media/tests/mochitest/test_peerConnection_audioSynchronizationSources.html
+++ b/dom/media/tests/mochitest/test_peerConnection_audioSynchronizationSources.html
@@ -30,17 +30,17 @@
     let receivers = [...test.pcRemote.getReceivers(),
                      ...test.pcLocal.getReceivers()];
     for (let recv of receivers) {
       let syncSources = recv.getSynchronizationSources();
       ok(syncSources,
          "Receiver has Synchronization sources " + JSON.stringify(syncSources));
       is(syncSources.length, 1, "Each receiver has only a single sync source");
       let source = recv.getSynchronizationSources()[0];
-      ok(source.audioLevel,
+      ok(source.audioLevel !== null,
          `Synchronization source has audio level. (${source.audioLevel})`);
       ok(source.audioLevel < 128,
          `Synchronization source audio level < 128. (${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