OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/host/desktop_process.h" | 5 #include "remoting/host/desktop_process.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 EXPECT_CALL(daemon_listener_, OnDesktopAttached(_)) | 274 EXPECT_CALL(daemon_listener_, OnDesktopAttached(_)) |
275 .WillOnce(DoAll( | 275 .WillOnce(DoAll( |
276 Invoke(this, &DesktopProcessTest::OnDesktopAttached), | 276 Invoke(this, &DesktopProcessTest::OnDesktopAttached), |
277 InvokeWithoutArgs(this, &DesktopProcessTest::SendCrashRequest))); | 277 InvokeWithoutArgs(this, &DesktopProcessTest::SendCrashRequest))); |
278 | 278 |
279 RunDesktopProcess(); | 279 RunDesktopProcess(); |
280 } | 280 } |
281 | 281 |
282 void DesktopProcessTest::SendCrashRequest() { | 282 void DesktopProcessTest::SendCrashRequest() { |
283 tracked_objects::Location location = FROM_HERE; | 283 tracked_objects::Location location = FROM_HERE; |
284 daemon_channel_->Send(new ChromotingDaemonDesktopMsg_Crash( | 284 daemon_channel_->Send(new ChromotingDaemonMsg_Crash( |
285 location.function_name(), location.file_name(), location.line_number())); | 285 location.function_name(), location.file_name(), location.line_number())); |
286 } | 286 } |
287 | 287 |
288 void DesktopProcessTest::SendStartSessionAgent() { | 288 void DesktopProcessTest::SendStartSessionAgent() { |
289 // TODO(alexeypa): Fix DesktopProcess to use the desktop environment | 289 // TODO(alexeypa): Fix DesktopProcess to use the desktop environment |
290 // to create the disconnect window instead of directly calling | 290 // to create the disconnect window instead of directly calling |
291 // DisconnectWindow::Create(). This will take care of "Uninteresting mock | 291 // DisconnectWindow::Create(). This will take care of "Uninteresting mock |
292 // function call" warnings printed when DisconnectWindow::Show() and | 292 // function call" warnings printed when DisconnectWindow::Show() and |
293 // DisconnectWindow::Hide() are called. | 293 // DisconnectWindow::Hide() are called. |
294 network_channel_->Send(new ChromotingNetworkDesktopMsg_StartSessionAgent( | 294 network_channel_->Send(new ChromotingNetworkDesktopMsg_StartSessionAgent( |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 } | 341 } |
342 | 342 |
343 // Run the desktop process and ask it to crash. | 343 // Run the desktop process and ask it to crash. |
344 TEST_F(DesktopProcessTest, DeathTest) { | 344 TEST_F(DesktopProcessTest, DeathTest) { |
345 testing::GTEST_FLAG(death_test_style) = "threadsafe"; | 345 testing::GTEST_FLAG(death_test_style) = "threadsafe"; |
346 | 346 |
347 EXPECT_DEATH(RunDeathTest(), ""); | 347 EXPECT_DEATH(RunDeathTest(), ""); |
348 } | 348 } |
349 | 349 |
350 } // namespace remoting | 350 } // namespace remoting |
OLD | NEW |