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

Unified Diff: remoting/host/win/worker_process_launcher_unittest.cc

Issue 2950993003: [Chromoting] Use ProcessStatsSender in DaemonProcess (daemon process) (Closed)
Patch Set: Resolve review comments Created 3 years, 6 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/win/worker_process_launcher.cc ('k') | remoting/host/worker_process_ipc_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/win/worker_process_launcher_unittest.cc
diff --git a/remoting/host/win/worker_process_launcher_unittest.cc b/remoting/host/win/worker_process_launcher_unittest.cc
index c7af99f9154a3cba8e28f45706eea21ebefd9b2f..e8e260fe17a9e9102683a3229f4468fb476571e7 100644
--- a/remoting/host/win/worker_process_launcher_unittest.cc
+++ b/remoting/host/win/worker_process_launcher_unittest.cc
@@ -68,6 +68,7 @@ class MockIpcDelegate : public WorkerProcessIpcDelegate {
MOCK_METHOD1(OnChannelConnected, void(int32_t));
MOCK_METHOD1(OnMessageReceived, bool(const IPC::Message&));
MOCK_METHOD1(OnPermanentError, void(int));
+ MOCK_METHOD0(OnWorkerProcessStopped, void());
private:
DISALLOW_COPY_AND_ASSIGN(MockIpcDelegate);
@@ -394,6 +395,8 @@ TEST_F(WorkerProcessLauncherTest, Start) {
.Times(0);
EXPECT_CALL(server_listener_, OnPermanentError(_))
.Times(0);
+ EXPECT_CALL(server_listener_, OnWorkerProcessStopped())
+ .Times(0);
StartWorker();
StopWorker();
@@ -414,6 +417,8 @@ TEST_F(WorkerProcessLauncherTest, StartAndConnect) {
&WorkerProcessLauncherTest::StopWorker));
EXPECT_CALL(server_listener_, OnPermanentError(_))
.Times(0);
+ EXPECT_CALL(server_listener_, OnWorkerProcessStopped())
+ .Times(0);
StartWorker();
base::RunLoop().Run();
@@ -438,6 +443,8 @@ TEST_F(WorkerProcessLauncherTest, Restart) {
EXPECT_CALL(server_listener_, OnPermanentError(_))
.Times(0);
+ EXPECT_CALL(server_listener_, OnWorkerProcessStopped())
+ .Times(1);
StartWorker();
base::RunLoop().Run();
@@ -461,6 +468,8 @@ TEST_F(WorkerProcessLauncherTest, DropIpcChannel) {
EXPECT_CALL(server_listener_, OnPermanentError(_))
.Times(0);
+ EXPECT_CALL(server_listener_, OnWorkerProcessStopped())
+ .Times(1);
StartWorker();
base::RunLoop().Run();
@@ -484,6 +493,8 @@ TEST_F(WorkerProcessLauncherTest, PermanentError) {
.Times(1)
.WillOnce(InvokeWithoutArgs(this,
&WorkerProcessLauncherTest::StopWorker));
+ EXPECT_CALL(server_listener_, OnWorkerProcessStopped())
+ .Times(1);
StartWorker();
base::RunLoop().Run();
@@ -509,6 +520,8 @@ TEST_F(WorkerProcessLauncherTest, Crash) {
&WorkerProcessLauncherTest::TerminateWorker,
base::Unretained(this),
EXCEPTION_BREAKPOINT)));
+ EXPECT_CALL(server_listener_, OnWorkerProcessStopped())
+ .Times(1);
StartWorker();
base::RunLoop().Run();
@@ -534,6 +547,8 @@ TEST_F(WorkerProcessLauncherTest, CrashAnyway) {
.Times(1)
.WillOnce(InvokeWithoutArgs(
this, &WorkerProcessLauncherTest::SendFakeMessageToLauncher));
+ EXPECT_CALL(server_listener_, OnWorkerProcessStopped())
+ .Times(1);
StartWorker();
base::RunLoop().Run();
« no previous file with comments | « remoting/host/win/worker_process_launcher.cc ('k') | remoting/host/worker_process_ipc_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698