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

Unified Diff: remoting/host/chromoting_host_unittest.cc

Issue 7633009: Use MessageLoopProxy for network message loop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 4 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
Index: remoting/host/chromoting_host_unittest.cc
diff --git a/remoting/host/chromoting_host_unittest.cc b/remoting/host/chromoting_host_unittest.cc
index 6fe5db8464db0fe7624e3aa9d02775c48e286e71..d37f79f2850f3593aa103e0b4e7289422344583f 100644
--- a/remoting/host/chromoting_host_unittest.cc
+++ b/remoting/host/chromoting_host_unittest.cc
@@ -4,6 +4,7 @@
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
+#include "base/message_loop_proxy.h"
#include "base/task.h"
#include "remoting/host/capturer_fake.h"
#include "remoting/host/chromoting_host.h"
@@ -68,13 +69,14 @@ class ChromotingHostTest : public testing::Test {
}
virtual void SetUp() OVERRIDE {
+ message_loop_proxy_ = base::MessageLoopProxy::CreateForCurrentThread();
config_ = new InMemoryHostConfig();
ON_CALL(context_, main_message_loop())
.WillByDefault(Return(&message_loop_));
ON_CALL(context_, encode_message_loop())
.WillByDefault(Return(&message_loop_));
ON_CALL(context_, network_message_loop())
- .WillByDefault(Return(&message_loop_));
+ .WillByDefault(Return(message_loop_proxy_.get()));
ON_CALL(context_, ui_message_loop())
.WillByDefault(Return(&message_loop_));
EXPECT_CALL(context_, main_message_loop())
@@ -111,9 +113,9 @@ class ChromotingHostTest : public testing::Test {
credentials_.set_username("user");
credentials_.set_credential("password");
connection_ = new MockConnectionToClient(
- &message_loop_, &handler_, &host_stub_, event_executor_);
+ &handler_, &host_stub_, event_executor_);
connection2_ = new MockConnectionToClient(
- &message_loop_, &handler_, &host_stub2_, &event_executor2_);
+ &handler_, &host_stub2_, &event_executor2_);
session_.reset(new MockSession());
session2_.reset(new MockSession());
session_config_.reset(SessionConfig::CreateDefault());
@@ -212,6 +214,7 @@ class ChromotingHostTest : public testing::Test {
protected:
MessageLoop message_loop_;
+ scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
MockConnectionToClientEventHandler handler_;
scoped_ptr<DesktopEnvironment> desktop_environment_;
scoped_refptr<ChromotingHost> host_;

Powered by Google App Engine
This is Rietveld 408576698