Chromium Code Reviews| Index: remoting/host/daemon_process_unittest.cc |
| diff --git a/remoting/host/daemon_process_unittest.cc b/remoting/host/daemon_process_unittest.cc |
| index c27b79a97c76af26423c826e7eac05294d100418..9d11ea2724cc79f8f75aef2d9daf990bf57ae85b 100644 |
| --- a/remoting/host/daemon_process_unittest.cc |
| +++ b/remoting/host/daemon_process_unittest.cc |
| @@ -40,7 +40,8 @@ enum Messages { |
| kMessageConnectTerminal = ChromotingNetworkHostMsg_ConnectTerminal::ID, |
| kMessageDisconnectTerminal = ChromotingNetworkHostMsg_DisconnectTerminal::ID, |
| kMessageTerminalDisconnected = |
| - ChromotingDaemonNetworkMsg_TerminalDisconnected::ID |
| + ChromotingDaemonNetworkMsg_TerminalDisconnected::ID, |
| + kMessageReportProcessStats = ChromotingAnyToNetworkMsg_ReportProcessStats::ID, |
| }; |
| // Provides a public constructor allowing the test to create instances of |
| @@ -347,4 +348,18 @@ TEST_F(DaemonProcessTest, InvalidConnectTerminal) { |
| EXPECT_EQ(0, terminal_id_); |
| } |
| +TEST_F(DaemonProcessTest, StartProcessStatsReport) { |
| + EXPECT_CALL(*daemon_process_, Sent(Message(kMessageReportProcessStats))); |
| + daemon_process_->OnMessageReceived( |
| + ChromotingNetworkToAnyMsg_StartProcessStatsReport( |
| + base::TimeDelta::FromMilliseconds(1))); |
| + base::RunLoop run_loop; |
| + ON_CALL(*daemon_process_, Sent(_)) |
| + .WillByDefault(testing::Invoke( |
| + [&run_loop](const IPC::Message& message) { |
| + run_loop.Quit(); |
| + })); |
| + run_loop.Run(); |
| +} |
|
joedow
2017/06/23 18:03:07
If you feel strongly about keeping the counter, th
Hzj_jie
2017/06/24 00:51:40
Done.
|
| + |
| } // namespace remoting |