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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 EXPECT_TRUE(handled); | 89 EXPECT_TRUE(handled); |
90 return handled; | 90 return handled; |
91 } | 91 } |
92 | 92 |
93 } // namespace | 93 } // namespace |
94 | 94 |
95 class DesktopProcessTest : public testing::Test { | 95 class DesktopProcessTest : public testing::Test { |
96 public: | 96 public: |
97 DesktopProcessTest(); | 97 DesktopProcessTest(); |
98 virtual ~DesktopProcessTest(); | 98 ~DesktopProcessTest() override; |
99 | 99 |
100 // testing::Test overrides | 100 // testing::Test overrides |
101 virtual void SetUp() override; | 101 void SetUp() override; |
102 virtual void TearDown() override; | 102 void TearDown() override; |
103 | 103 |
104 // MockDaemonListener mocks | 104 // MockDaemonListener mocks |
105 void ConnectNetworkChannel(IPC::PlatformFileForTransit desktop_process); | 105 void ConnectNetworkChannel(IPC::PlatformFileForTransit desktop_process); |
106 void OnDesktopAttached(IPC::PlatformFileForTransit desktop_process); | 106 void OnDesktopAttached(IPC::PlatformFileForTransit desktop_process); |
107 | 107 |
108 // Creates a DesktopEnvironment with a fake webrtc::DesktopCapturer, to mock | 108 // Creates a DesktopEnvironment with a fake webrtc::DesktopCapturer, to mock |
109 // DesktopEnvironmentFactory::Create(). | 109 // DesktopEnvironmentFactory::Create(). |
110 DesktopEnvironment* CreateDesktopEnvironment(); | 110 DesktopEnvironment* CreateDesktopEnvironment(); |
111 | 111 |
112 // Creates a dummy InputInjector, to mock | 112 // Creates a dummy InputInjector, to mock |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 } | 336 } |
337 | 337 |
338 // Run the desktop process and ask it to crash. | 338 // Run the desktop process and ask it to crash. |
339 TEST_F(DesktopProcessTest, DeathTest) { | 339 TEST_F(DesktopProcessTest, DeathTest) { |
340 testing::GTEST_FLAG(death_test_style) = "threadsafe"; | 340 testing::GTEST_FLAG(death_test_style) = "threadsafe"; |
341 | 341 |
342 EXPECT_DEATH(RunDeathTest(), ""); | 342 EXPECT_DEATH(RunDeathTest(), ""); |
343 } | 343 } |
344 | 344 |
345 } // namespace remoting | 345 } // namespace remoting |
OLD | NEW |