Bug 1296531 - Fix AudioTrackEncoder resampling gtest to match comment. r=jesup
authorAndreas Pehrson <pehrsons@gmail.com>
Fri, 17 Feb 2017 12:23:43 +0100
changeset 383039 dd39cf469d202d7b18d3672c98568a4cf090f80f
parent 383038 463b0c40f07ec416c279a25e681810c692e0b55e
child 383040 f265edf5234cf9bd937f1fe2a9cf5b2b320a3387
push id32582
push userkwierso@gmail.com
push dateWed, 27 Sep 2017 00:11:27 +0000
treeherdermozilla-central@70158e4e215d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1296531
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1296531 - Fix AudioTrackEncoder resampling gtest to match comment. r=jesup MozReview-Commit-ID: F0uCA9VkeQf
dom/media/gtest/TestAudioTrackEncoder.cpp
--- a/dom/media/gtest/TestAudioTrackEncoder.cpp
+++ b/dom/media/gtest/TestAudioTrackEncoder.cpp
@@ -197,18 +197,18 @@ TEST(OpusAudioTrackEncoder, Resample)
   // (kHz)) at initialization.
   EXPECT_TRUE(TestOpusResampler(1, 8000) == 8000);
   EXPECT_TRUE(TestOpusResampler(1, 12000) == 12000);
   EXPECT_TRUE(TestOpusResampler(1, 16000) == 16000);
   EXPECT_TRUE(TestOpusResampler(1, 24000) == 24000);
   EXPECT_TRUE(TestOpusResampler(1, 48000) == 48000);
 
   // Otherwise, it should be resampled to 48kHz by resampler.
-  EXPECT_FALSE(TestOpusResampler(1, 9600) == 9600);
-  EXPECT_FALSE(TestOpusResampler(1, 44100) == 44100);
+  EXPECT_TRUE(TestOpusResampler(1, 9600) == 48000);
+  EXPECT_TRUE(TestOpusResampler(1, 44100) == 48000);
 }
 
 TEST(OpusAudioTrackEncoder, FetchMetadata)
 {
   const int32_t channels = 1;
   const int32_t sampleRate = 44100;
   TestOpusTrackEncoder encoder;
   EXPECT_TRUE(encoder.TestOpusCreation(channels, sampleRate));