Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(426)

Unified Diff: remoting/protocol/connection_unittest.cc

Issue 2653563004: Revert 25680c62320767f590d037d301edfe15e9c55650 (Closed)
Patch Set: . Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/protocol/webrtc_audio_module.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_unittest.cc
diff --git a/remoting/protocol/connection_unittest.cc b/remoting/protocol/connection_unittest.cc
index bf106fc26678cea61f0d7d34ad9b7b0b261b91d5..b1e40f6e5c2d432dc8d341a9943716bb2bb13bee 100644
--- a/remoting/protocol/connection_unittest.cc
+++ b/remoting/protocol/connection_unittest.cc
@@ -11,8 +11,6 @@
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
-#include "base/threading/thread.h"
-#include "base/threading/thread_checker.h"
#include "remoting/base/constants.h"
#include "remoting/proto/audio.pb.h"
#include "remoting/protocol/audio_source.h"
@@ -187,7 +185,6 @@ class FakeAudioPlayer : public AudioStub {
// AudioStub interface.
void ProcessAudioPacket(std::unique_ptr<AudioPacket> packet,
const base::Closure& done) override {
- base::ThreadChecker thread_checker_;
EXPECT_EQ(AudioPacket::ENCODING_RAW, packet->encoding());
EXPECT_EQ(AudioPacket::SAMPLING_RATE_48000, packet->sampling_rate());
EXPECT_EQ(AudioPacket::BYTES_PER_SAMPLE_2, packet->bytes_per_sample());
@@ -244,7 +241,6 @@ class FakeAudioPlayer : public AudioStub {
base::WeakPtr<AudioStub> GetWeakPtr() { return weak_factory_.GetWeakPtr(); }
private:
- base::ThreadChecker thread_checker_;
std::vector<char> data_;
base::RunLoop* run_loop_ = nullptr;
size_t samples_expected_ = 0;
@@ -257,14 +253,7 @@ class FakeAudioPlayer : public AudioStub {
class ConnectionTest : public testing::Test,
public testing::WithParamInterface<bool> {
public:
- ConnectionTest()
- : video_encode_thread_("VideoEncode"),
- audio_encode_thread_("AudioEncode"),
- audio_decode_thread_("AudioDecode") {
- video_encode_thread_.Start();
- audio_encode_thread_.Start();
- audio_decode_thread_.Start();
- }
+ ConnectionTest() {}
void DestroyHost() {
host_connection_.reset();
@@ -307,7 +296,7 @@ class ConnectionTest : public testing::Test,
client_connection_->set_clipboard_stub(&client_clipboard_stub_);
client_connection_->set_video_renderer(&client_video_renderer_);
- client_connection_->InitializeAudio(audio_decode_thread_.task_runner(),
+ client_connection_->InitializeAudio(message_loop_.task_runner(),
client_audio_player_.GetWeakPtr());
}
@@ -449,10 +438,6 @@ class ConnectionTest : public testing::Test,
std::unique_ptr<FakeSession> owned_client_session_;
bool client_connected_ = false;
- base::Thread video_encode_thread_;
- base::Thread audio_encode_thread_;
- base::Thread audio_decode_thread_;
-
private:
DISALLOW_COPY_AND_ASSIGN(ConnectionTest);
};
« no previous file with comments | « no previous file | remoting/protocol/webrtc_audio_module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698