OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "remoting/host/audio_pump.h" | 5 #include "remoting/host/audio_pump.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 9 #include "base/macros.h" |
7 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
8 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
10 #include "remoting/codec/audio_encoder.h" | 13 #include "remoting/codec/audio_encoder.h" |
11 #include "remoting/host/audio_capturer.h" | 14 #include "remoting/host/audio_capturer.h" |
12 #include "remoting/proto/audio.pb.h" | 15 #include "remoting/proto/audio.pb.h" |
13 #include "remoting/protocol/audio_stub.h" | 16 #include "remoting/protocol/audio_stub.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
15 | 18 |
16 namespace remoting { | 19 namespace remoting { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 done_closures_.front().Run(); | 134 done_closures_.front().Run(); |
132 base::RunLoop().RunUntilIdle(); | 135 base::RunLoop().RunUntilIdle(); |
133 | 136 |
134 // Verify that the pump continues to send captured audio. | 137 // Verify that the pump continues to send captured audio. |
135 capturer_->callback().Run(MakeAudioPacket()); | 138 capturer_->callback().Run(MakeAudioPacket()); |
136 base::RunLoop().RunUntilIdle(); | 139 base::RunLoop().RunUntilIdle(); |
137 EXPECT_EQ(num_sent_packets + 1, sent_packets_.size()); | 140 EXPECT_EQ(num_sent_packets + 1, sent_packets_.size()); |
138 } | 141 } |
139 | 142 |
140 } // namespace remoting | 143 } // namespace remoting |
OLD | NEW |