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

Unified Diff: util/mach/mach_message_server_test.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « util/mac/process_reader_test.cc ('k') | util/test/mac/mach_multiprocess.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mach/mach_message_server_test.cc
diff --git a/util/mach/mach_message_server_test.cc b/util/mach/mach_message_server_test.cc
index f732bbc29df4b3d3d078f6679c888a1e0677cc0a..fe6f0eddc5f6ccbe733268a8f435bfad69cb7139 100644
--- a/util/mach/mach_message_server_test.cc
+++ b/util/mach/mach_message_server_test.cc
@@ -398,12 +398,9 @@ class TestMachMessageServer : public MachMessageServer::Interface,
// process replies before all of the requests are sent, because the
// server won’t have sent any replies until all of the requests are in
// its queue.
- ChildSendRequest();
+ ASSERT_NO_FATAL_FAILURE(ChildSendRequest());
} else {
- ChildSendRequestAndWaitForReply();
- }
- if (testing::Test::HasFatalFailure()) {
- return;
+ ASSERT_NO_FATAL_FAILURE(ChildSendRequestAndWaitForReply());
}
}
@@ -411,18 +408,12 @@ class TestMachMessageServer : public MachMessageServer::Interface,
options_.child_send_all_requests_before_receiving_any_replies) {
// Now that all of the requests have been sent, let the parent know that
// it’s safe to begin processing them, and then wait for the replies.
- ChildNotifyParentViaPipe();
- if (testing::Test::HasFatalFailure()) {
- return;
- }
+ ASSERT_NO_FATAL_FAILURE(ChildNotifyParentViaPipe());
for (size_t index = 0;
index < options_.client_send_request_count;
++index) {
- ChildWaitForReply();
- if (testing::Test::HasFatalFailure()) {
- return;
- }
+ ASSERT_NO_FATAL_FAILURE(ChildWaitForReply());
}
}
@@ -562,22 +553,16 @@ class TestMachMessageServer : public MachMessageServer::Interface,
// In the child process, sends a request message to the server and then
// receives a reply message.
void ChildSendRequestAndWaitForReply() {
- ChildSendRequest();
- if (testing::Test::HasFatalFailure()) {
- return;
- }
+ ASSERT_NO_FATAL_FAILURE(ChildSendRequest());
if (options_.parent_wait_for_child_pipe &&
!options_.child_send_all_requests_before_receiving_any_replies) {
// The parent is waiting to read a byte to indicate that the message has
// been placed in the queue.
- ChildNotifyParentViaPipe();
- if (testing::Test::HasFatalFailure()) {
- return;
- }
+ ASSERT_NO_FATAL_FAILURE(ChildNotifyParentViaPipe());
}
- ChildWaitForReply();
+ ASSERT_NO_FATAL_FAILURE(ChildWaitForReply());
}
const Options& options_;
« no previous file with comments | « util/mac/process_reader_test.cc ('k') | util/test/mac/mach_multiprocess.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698