Index: remoting/host/it2me/it2me_native_messaging_host_unittest.cc |
diff --git a/remoting/host/it2me/it2me_native_messaging_host_unittest.cc b/remoting/host/it2me/it2me_native_messaging_host_unittest.cc |
index 2e79b36d79398fc97cf70492e8062b058183a13a..07255101cd300f0ecac4b96d04a850ad6ae9171b 100644 |
--- a/remoting/host/it2me/it2me_native_messaging_host_unittest.cc |
+++ b/remoting/host/it2me/it2me_native_messaging_host_unittest.cc |
@@ -17,6 +17,7 @@ |
#include "net/base/net_util.h" |
#include "remoting/base/auto_thread_task_runner.h" |
#include "remoting/host/chromoting_host_context.h" |
+#include "remoting/host/native_messaging/native_messaging_pipe.h" |
#include "remoting/host/native_messaging/pipe_messaging_channel.h" |
#include "remoting/host/setup/test_util.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -209,7 +210,7 @@ class It2MeNativeMessagingHostTest : public testing::Test { |
// Task runner of the host thread. |
scoped_refptr<AutoThreadTaskRunner> host_task_runner_; |
- scoped_ptr<remoting::It2MeNativeMessagingHost> host_; |
+ scoped_ptr<remoting::NativeMessagingPipe> host_; |
Sergey Ulanov
2014/09/27 00:24:10
rename this, e.g. pipe_?
kelvinp
2014/09/29 22:59:40
Done.
|
DISALLOW_COPY_AND_ASSIGN(It2MeNativeMessagingHostTest); |
}; |
@@ -431,14 +432,18 @@ void It2MeNativeMessagingHostTest::StartHost() { |
// Creating a native messaging host with a mock It2MeHostFactory. |
scoped_ptr<It2MeHostFactory> factory(new MockIt2MeHostFactory()); |
+ host_.reset(new NativeMessagingPipe()); |
+ |
scoped_ptr<extensions::NativeMessagingChannel> channel( |
new PipeMessagingChannel(input_read_file.Pass(), |
output_write_file.Pass())); |
- host_.reset(new It2MeNativeMessagingHost( |
- host_task_runner_, |
- channel.Pass(), |
- factory.Pass())); |
+ scoped_ptr<extensions::NativeMessageHost> it2meHost( |
Sergey Ulanov
2014/09/27 00:24:10
it2me_host
kelvinp
2014/09/29 22:59:40
Done.
|
+ new It2MeNativeMessagingHost( |
+ host_task_runner_, |
+ factory.Pass())); |
+ it2meHost->set_client(host_->AsWeakPtr()); |
+ |
host_->Start(base::Bind(&It2MeNativeMessagingHostTest::StopHost, |
Sergey Ulanov
2014/09/27 00:24:10
I think you also want to call Init() here. (but it
kelvinp
2014/09/29 22:59:40
Good catch.
I think it is better to keep the const
|
base::Unretained(this))); |