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

Unified Diff: remoting/host/log_to_server_unittest.cc

Issue 12386035: Moving host status events monitoring to a separate interface (HostStatusMonitor). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 10 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 | « remoting/host/log_to_server.cc ('k') | remoting/host/plugin/host_script_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/log_to_server_unittest.cc
diff --git a/remoting/host/log_to_server_unittest.cc b/remoting/host/log_to_server_unittest.cc
index 4277e49818b9a2f5e59ee94f12c5e776d9ae5f7c..1fb0500a3658efe163195381567f93b24ecf6e6b 100644
--- a/remoting/host/log_to_server_unittest.cc
+++ b/remoting/host/log_to_server_unittest.cc
@@ -4,10 +4,11 @@
#include "base/message_loop.h"
#include "base/message_loop_proxy.h"
-#include "remoting/jingle_glue/mock_objects.h"
+#include "remoting/host/host_status_monitor_fake.h"
#include "remoting/host/log_to_server.h"
-#include "testing/gmock_mutant.h"
+#include "remoting/jingle_glue/mock_objects.h"
#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gmock_mutant.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/libjingle/source/talk/xmllite/xmlelement.h"
@@ -126,7 +127,9 @@ class LogToServerTest : public testing::Test {
message_loop_proxy_ = base::MessageLoopProxy::current();
EXPECT_CALL(signal_strategy_, AddListener(_));
log_to_server_.reset(
- new LogToServer(NULL, ServerLogEntry::ME2ME, &signal_strategy_,
+ new LogToServer(host_status_monitor_.AsWeakPtr(),
+ ServerLogEntry::ME2ME,
+ &signal_strategy_,
kTestBotJid));
EXPECT_CALL(signal_strategy_, RemoveListener(_));
}
@@ -136,6 +139,7 @@ class LogToServerTest : public testing::Test {
scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
MockSignalStrategy signal_strategy_;
scoped_ptr<LogToServer> log_to_server_;
+ HostStatusMonitorFake host_status_monitor_;
};
TEST_F(LogToServerTest, SendNow) {
« no previous file with comments | « remoting/host/log_to_server.cc ('k') | remoting/host/plugin/host_script_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698