OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 } | 91 } |
92 return out.str(); | 92 return out.str(); |
93 } | 93 } |
94 }; | 94 }; |
95 | 95 |
96 } // namespace | 96 } // namespace |
97 | 97 |
98 class AudioEncoderTest : public ::testing::TestWithParam<TestScenario> { | 98 class AudioEncoderTest : public ::testing::TestWithParam<TestScenario> { |
99 public: | 99 public: |
100 AudioEncoderTest() { | 100 AudioEncoderTest() { |
101 InitializeMediaLibraryForTesting(); | 101 InitializeMediaLibrary(); |
102 testing_clock_ = new base::SimpleTestTickClock(); | 102 testing_clock_ = new base::SimpleTestTickClock(); |
103 testing_clock_->Advance(base::TimeTicks::Now() - base::TimeTicks()); | 103 testing_clock_->Advance(base::TimeTicks::Now() - base::TimeTicks()); |
104 } | 104 } |
105 | 105 |
106 void SetUp() final { | 106 void SetUp() final { |
107 task_runner_ = new test::FakeSingleThreadTaskRunner(testing_clock_); | 107 task_runner_ = new test::FakeSingleThreadTaskRunner(testing_clock_); |
108 cast_environment_ = | 108 cast_environment_ = |
109 new CastEnvironment(scoped_ptr<base::TickClock>(testing_clock_).Pass(), | 109 new CastEnvironment(scoped_ptr<base::TickClock>(testing_clock_).Pass(), |
110 task_runner_, | 110 task_runner_, |
111 task_runner_, | 111 task_runner_, |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 TestScenario(kManyCalls_Mixed2, arraysize(kManyCalls_Mixed2)), | 243 TestScenario(kManyCalls_Mixed2, arraysize(kManyCalls_Mixed2)), |
244 TestScenario(kManyCalls_Mixed3, arraysize(kManyCalls_Mixed3)), | 244 TestScenario(kManyCalls_Mixed3, arraysize(kManyCalls_Mixed3)), |
245 TestScenario(kManyCalls_Mixed4, arraysize(kManyCalls_Mixed4)), | 245 TestScenario(kManyCalls_Mixed4, arraysize(kManyCalls_Mixed4)), |
246 TestScenario(kManyCalls_Mixed5, arraysize(kManyCalls_Mixed5)), | 246 TestScenario(kManyCalls_Mixed5, arraysize(kManyCalls_Mixed5)), |
247 TestScenario(kOneBigUnderrun, arraysize(kOneBigUnderrun)), | 247 TestScenario(kOneBigUnderrun, arraysize(kOneBigUnderrun)), |
248 TestScenario(kTwoBigUnderruns, arraysize(kTwoBigUnderruns)), | 248 TestScenario(kTwoBigUnderruns, arraysize(kTwoBigUnderruns)), |
249 TestScenario(kMixedUnderruns, arraysize(kMixedUnderruns)))); | 249 TestScenario(kMixedUnderruns, arraysize(kMixedUnderruns)))); |
250 | 250 |
251 } // namespace cast | 251 } // namespace cast |
252 } // namespace media | 252 } // namespace media |
OLD | NEW |