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

Side by Side Diff: chrome/common/service_process_util_unittest.cc

Issue 10704115: Switch to TimeDelta interfaces of TestTimeouts in chrome and ui code reviewable by ben. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 (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 "chrome/common/service_process_util.h" 5 #include "chrome/common/service_process_util.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 for (int i = 0; !CheckServiceProcessReady() && i < 10; ++i) { 187 for (int i = 0; !CheckServiceProcessReady() && i < 10; ++i) {
188 base::PlatformThread::Sleep(TestTimeouts::tiny_timeout()); 188 base::PlatformThread::Sleep(TestTimeouts::tiny_timeout());
189 } 189 }
190 ASSERT_TRUE(CheckServiceProcessReady()); 190 ASSERT_TRUE(CheckServiceProcessReady());
191 std::string version; 191 std::string version;
192 base::ProcessId pid; 192 base::ProcessId pid;
193 ASSERT_TRUE(GetServiceProcessData(&version, &pid)); 193 ASSERT_TRUE(GetServiceProcessData(&version, &pid));
194 ASSERT_TRUE(ForceServiceProcessShutdown(version, pid)); 194 ASSERT_TRUE(ForceServiceProcessShutdown(version, pid));
195 int exit_code = 0; 195 int exit_code = 0;
196 ASSERT_TRUE(base::WaitForExitCodeWithTimeout(handle, 196 ASSERT_TRUE(base::WaitForExitCodeWithTimeout(handle,
197 &exit_code, TestTimeouts::action_max_timeout_ms())); 197 &exit_code, TestTimeouts::action_max_timeout()));
198 base::CloseProcessHandle(handle); 198 base::CloseProcessHandle(handle);
199 ASSERT_EQ(exit_code, 0); 199 ASSERT_EQ(exit_code, 0);
200 } 200 }
201 201
202 MULTIPROCESS_TEST_MAIN(ServiceProcessStateTestSingleton) { 202 MULTIPROCESS_TEST_MAIN(ServiceProcessStateTestSingleton) {
203 ServiceProcessState state; 203 ServiceProcessState state;
204 EXPECT_FALSE(state.Initialize()); 204 EXPECT_FALSE(state.Initialize());
205 return 0; 205 return 0;
206 } 206 }
207 207
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 ScopedAttributesRestorer restorer(bundle_path(), 0777); 409 ScopedAttributesRestorer restorer(bundle_path(), 0777);
410 GetIOMessageLoopProxy()->PostTask( 410 GetIOMessageLoopProxy()->PostTask(
411 FROM_HERE, 411 FROM_HERE,
412 base::Bind(&ChangeAttr, bundle_path(), 0222)); 412 base::Bind(&ChangeAttr, bundle_path(), 0222));
413 Run(); 413 Run();
414 ASSERT_TRUE(mock_launchd()->remove_called()); 414 ASSERT_TRUE(mock_launchd()->remove_called());
415 ASSERT_TRUE(mock_launchd()->delete_called()); 415 ASSERT_TRUE(mock_launchd()->delete_called());
416 } 416 }
417 417
418 #endif // !OS_MACOSX 418 #endif // !OS_MACOSX
OLDNEW
« no previous file with comments | « chrome/browser/service/service_process_control_browsertest.cc ('k') | ui/base/test/ui_cocoa_test_helper.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698