| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 TEST_F(CrasUnifiedStreamTest, RenderFrames) { | 136 TEST_F(CrasUnifiedStreamTest, RenderFrames) { |
| 137 CrasUnifiedStream* test_stream = CreateStream(CHANNEL_LAYOUT_MONO); | 137 CrasUnifiedStream* test_stream = CreateStream(CHANNEL_LAYOUT_MONO); |
| 138 MockAudioSourceCallback mock_callback; | 138 MockAudioSourceCallback mock_callback; |
| 139 | 139 |
| 140 ASSERT_TRUE(test_stream->Open()); | 140 ASSERT_TRUE(test_stream->Open()); |
| 141 | 141 |
| 142 base::WaitableEvent event(base::WaitableEvent::ResetPolicy::AUTOMATIC, | 142 base::WaitableEvent event(base::WaitableEvent::ResetPolicy::AUTOMATIC, |
| 143 base::WaitableEvent::InitialState::NOT_SIGNALED); | 143 base::WaitableEvent::InitialState::NOT_SIGNALED); |
| 144 | 144 |
| 145 EXPECT_CALL(mock_callback, OnMoreData(_, _, 0)) | 145 EXPECT_CALL(mock_callback, OnMoreData(_, _, 0, _)) |
| 146 .WillRepeatedly( | 146 .WillRepeatedly( |
| 147 DoAll(InvokeWithoutArgs(&event, &base::WaitableEvent::Signal), | 147 DoAll(InvokeWithoutArgs(&event, &base::WaitableEvent::Signal), |
| 148 Return(kTestFramesPerPacket))); | 148 Return(kTestFramesPerPacket))); |
| 149 | 149 |
| 150 test_stream->Start(&mock_callback); | 150 test_stream->Start(&mock_callback); |
| 151 | 151 |
| 152 // Wait for samples to be captured. | 152 // Wait for samples to be captured. |
| 153 EXPECT_TRUE(event.TimedWait(TestTimeouts::action_timeout())); | 153 EXPECT_TRUE(event.TimedWait(TestTimeouts::action_timeout())); |
| 154 | 154 |
| 155 test_stream->Stop(); | 155 test_stream->Stop(); |
| 156 | 156 |
| 157 test_stream->Close(); | 157 test_stream->Close(); |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace media | 160 } // namespace media |
| OLD | NEW |