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

Side by Side Diff: util/test/mac/mach_multiprocess.cc

Issue 640383002: In tests, use ASSERT_NO_FATAL_FAILURE() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « util/mach/mach_message_server_test.cc ('k') | util/test/multiprocess.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 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 base::AutoReset<internal::MachMultiprocessInfo*> reset_info(&info_, 75 base::AutoReset<internal::MachMultiprocessInfo*> reset_info(&info_,
76 info.get()); 76 info.get());
77 77
78 return Multiprocess::Run(); 78 return Multiprocess::Run();
79 } 79 }
80 80
81 MachMultiprocess::~MachMultiprocess() { 81 MachMultiprocess::~MachMultiprocess() {
82 } 82 }
83 83
84 void MachMultiprocess::PreFork() { 84 void MachMultiprocess::PreFork() {
85 Multiprocess::PreFork(); 85 ASSERT_NO_FATAL_FAILURE(Multiprocess::PreFork());
86 if (testing::Test::HasFatalFailure()) {
87 return;
88 }
89 86
90 // Set up the parent port and register it with the bootstrap server before 87 // Set up the parent port and register it with the bootstrap server before
91 // forking, so that it’s guaranteed to be there when the child attempts to 88 // forking, so that it’s guaranteed to be there when the child attempts to
92 // look it up. 89 // look it up.
93 info_->service_name = "com.googlecode.crashpad.test.mach_multiprocess."; 90 info_->service_name = "com.googlecode.crashpad.test.mach_multiprocess.";
94 for (int index = 0; index < 16; ++index) { 91 for (int index = 0; index < 16; ++index) {
95 info_->service_name.append(1, base::RandInt('A', 'Z')); 92 info_->service_name.append(1, base::RandInt('A', 'Z'));
96 } 93 }
97 94
98 mach_port_t local_port; 95 mach_port_t local_port;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 if (testing::Test::HasFailure()) { 269 if (testing::Test::HasFailure()) {
273 // Trigger the ScopedForbidReturn destructor. 270 // Trigger the ScopedForbidReturn destructor.
274 return; 271 return;
275 } 272 }
276 273
277 forbid_return.Disarm(); 274 forbid_return.Disarm();
278 } 275 }
279 276
280 } // namespace test 277 } // namespace test
281 } // namespace crashpad 278 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/mach/mach_message_server_test.cc ('k') | util/test/multiprocess.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698