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

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

Issue 6794056: Revert 80472 - GTTF: Detect browser crashes on shutdown in UI tests.Previously the automation fra... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/unload_uitest.cc ('k') | chrome/test/automation/proxy_launcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 8
9 #if !defined(OS_MACOSX) 9 #if !defined(OS_MACOSX)
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 for (int i = 0; !CheckServiceProcessReady() && i < 10; ++i) { 173 for (int i = 0; !CheckServiceProcessReady() && i < 10; ++i) {
174 base::PlatformThread::Sleep(TestTimeouts::tiny_timeout_ms()); 174 base::PlatformThread::Sleep(TestTimeouts::tiny_timeout_ms());
175 } 175 }
176 ASSERT_TRUE(CheckServiceProcessReady()); 176 ASSERT_TRUE(CheckServiceProcessReady());
177 std::string version; 177 std::string version;
178 base::ProcessId pid; 178 base::ProcessId pid;
179 ASSERT_TRUE(GetServiceProcessData(&version, &pid)); 179 ASSERT_TRUE(GetServiceProcessData(&version, &pid));
180 ASSERT_TRUE(ForceServiceProcessShutdown(version, pid)); 180 ASSERT_TRUE(ForceServiceProcessShutdown(version, pid));
181 int exit_code = 0; 181 int exit_code = 0;
182 ASSERT_TRUE(base::WaitForExitCodeWithTimeout(handle, 182 ASSERT_TRUE(base::WaitForExitCodeWithTimeout(handle,
183 &exit_code, TestTimeouts::action_max_timeout_ms())); 183 &exit_code, TestTimeouts::action_timeout_ms() * 2));
184 base::CloseProcessHandle(handle);
185 ASSERT_EQ(exit_code, 0); 184 ASSERT_EQ(exit_code, 0);
186 } 185 }
187 186
188 MULTIPROCESS_TEST_MAIN(ServiceProcessStateTestSingleton) { 187 MULTIPROCESS_TEST_MAIN(ServiceProcessStateTestSingleton) {
189 ServiceProcessState state; 188 ServiceProcessState state;
190 EXPECT_FALSE(state.Initialize()); 189 EXPECT_FALSE(state.Initialize());
191 return 0; 190 return 0;
192 } 191 }
193 192
194 MULTIPROCESS_TEST_MAIN(ServiceProcessStateTestReadyTrue) { 193 MULTIPROCESS_TEST_MAIN(ServiceProcessStateTestReadyTrue) {
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 ScopedAttributesRestorer restorer(bundle_path(), 0777); 540 ScopedAttributesRestorer restorer(bundle_path(), 0777);
542 GetIOMessageLoopProxy()->PostTask( 541 GetIOMessageLoopProxy()->PostTask(
543 FROM_HERE, 542 FROM_HERE,
544 NewRunnableFunction(&ChangeAttr, bundle_path(), 0222)); 543 NewRunnableFunction(&ChangeAttr, bundle_path(), 0222));
545 Run(); 544 Run();
546 ASSERT_TRUE(mock_launchd()->remove_called()); 545 ASSERT_TRUE(mock_launchd()->remove_called());
547 ASSERT_TRUE(mock_launchd()->delete_called()); 546 ASSERT_TRUE(mock_launchd()->delete_called());
548 } 547 }
549 548
550 #endif // !OS_MACOSX 549 #endif // !OS_MACOSX
OLDNEW
« no previous file with comments | « chrome/browser/unload_uitest.cc ('k') | chrome/test/automation/proxy_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698