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

Side by Side Diff: chrome/browser/process_singleton_win_unittest.cc

Issue 2098713003: Moved a bunch of win-specific files to the new win folder in chrome/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/process_singleton.h" 5 #include "chrome/browser/process_singleton.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 protected: 147 protected:
148 enum WindowOption { WITH_WINDOW, NO_WINDOW }; 148 enum WindowOption { WITH_WINDOW, NO_WINDOW };
149 149
150 ProcessSingletonTest() 150 ProcessSingletonTest()
151 : window_option_(NO_WINDOW), should_kill_called_(false) {} 151 : window_option_(NO_WINDOW), should_kill_called_(false) {}
152 152
153 void SetUp() override { 153 void SetUp() override {
154 ASSERT_NO_FATAL_FAILURE(base::MultiProcessTest::SetUp()); 154 ASSERT_NO_FATAL_FAILURE(base::MultiProcessTest::SetUp());
155 155
156 // Drop the process finder notification timeout to one second for testing. 156 // Drop the process finder notification timeout to one second for testing.
157 old_notification_timeout_ = chrome::SetNotificationTimeoutForTesting( 157 old_notification_timeout_ = chrome::win::SetNotificationTimeoutForTesting(
158 base::TimeDelta::FromSeconds(1)); 158 base::TimeDelta::FromSeconds(1));
159 } 159 }
160 160
161 void TearDown() override { 161 void TearDown() override {
162 chrome::SetNotificationTimeoutForTesting(old_notification_timeout_); 162 chrome::win::SetNotificationTimeoutForTesting(old_notification_timeout_);
163 163
164 if (browser_victim_.IsValid()) { 164 if (browser_victim_.IsValid()) {
165 EXPECT_TRUE(::SetEvent(continue_event_.Get())); 165 EXPECT_TRUE(::SetEvent(continue_event_.Get()));
166 EXPECT_TRUE(browser_victim_.WaitForExit(nullptr)); 166 EXPECT_TRUE(browser_victim_.WaitForExit(nullptr));
167 } 167 }
168 168
169 base::MultiProcessTest::TearDown(); 169 base::MultiProcessTest::TearDown();
170 } 170 }
171 171
172 void LaunchHungBrowserProcess(WindowOption window_option) { 172 void LaunchHungBrowserProcess(WindowOption window_option) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // visible window. 310 // visible window.
311 EXPECT_TRUE(should_kill_called()); 311 EXPECT_TRUE(should_kill_called());
312 312
313 // Verify that the hung browser has beem terminated with the 313 // Verify that the hung browser has beem terminated with the
314 // RESULT_CODE_HUNG exit code. 314 // RESULT_CODE_HUNG exit code.
315 int exit_code = 0; 315 int exit_code = 0;
316 EXPECT_TRUE( 316 EXPECT_TRUE(
317 browser_victim()->WaitForExitWithTimeout(base::TimeDelta(), &exit_code)); 317 browser_victim()->WaitForExitWithTimeout(base::TimeDelta(), &exit_code));
318 EXPECT_EQ(content::RESULT_CODE_HUNG, exit_code); 318 EXPECT_EQ(content::RESULT_CODE_HUNG, exit_code);
319 } 319 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698