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

Side by Side Diff: mojo/edk/test/mojo_test_base.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "mojo/edk/test/mojo_test_base.h" 5 #include "mojo/edk/test/mojo_test_base.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "mojo/edk/embedder/embedder.h" 10 #include "mojo/edk/embedder/embedder.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 #endif 65 #endif
66 helper_.set_process_error_callback(process_error_callback); 66 helper_.set_process_error_callback(process_error_callback);
67 pipe_ = helper_.StartChild(client_name, launch_type); 67 pipe_ = helper_.StartChild(client_name, launch_type);
68 #if defined(OS_MACOSX) 68 #if defined(OS_MACOSX)
69 g_mach_broker->AddPlaceholderForPid(helper_.test_child().Handle()); 69 g_mach_broker->AddPlaceholderForPid(helper_.test_child().Handle());
70 #endif 70 #endif
71 #endif 71 #endif
72 } 72 }
73 73
74 MojoTestBase::ClientController::~ClientController() { 74 MojoTestBase::ClientController::~ClientController() {
75 CHECK(was_shutdown_) 75 // Test clients should be waited on explicitly with WaitForShutdown().
76 << "Test clients should be waited on explicitly with WaitForShutdown()."; 76 CHECK(was_shutdown_);
77 } 77 }
78 78
79 void MojoTestBase::ClientController::ClosePeerConnection() { 79 void MojoTestBase::ClientController::ClosePeerConnection() {
80 #if !defined(OS_IOS) 80 #if !defined(OS_IOS)
81 helper_.ClosePeerConnection(); 81 helper_.ClosePeerConnection();
82 #endif 82 #endif
83 } 83 }
84 84
85 int MojoTestBase::ClientController::WaitForShutdown() { 85 int MojoTestBase::ClientController::WaitForShutdown() {
86 was_shutdown_ = true; 86 was_shutdown_ = true;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 MOJO_WRITE_DATA_FLAG_ALL_OR_NONE), 309 MOJO_WRITE_DATA_FLAG_ALL_OR_NONE),
310 MOJO_RESULT_OK); 310 MOJO_RESULT_OK);
311 CHECK_EQ(num_bytes, static_cast<uint32_t>(size)); 311 CHECK_EQ(num_bytes, static_cast<uint32_t>(size));
312 312
313 return std::string(buffer.data(), buffer.size()); 313 return std::string(buffer.data(), buffer.size());
314 } 314 }
315 315
316 } // namespace test 316 } // namespace test
317 } // namespace edk 317 } // namespace edk
318 } // namespace mojo 318 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698