| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Utilities for testing. | 5 // Utilities for testing. |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "ceee/testing/utils/test_utils.h" | 10 #include "ceee/testing/utils/test_utils.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 } | 50 } |
| 51 CHECK(NULL != conn.pUnk); | 51 CHECK(NULL != conn.pUnk); |
| 52 conn.pUnk->Release(); | 52 conn.pUnk->Release(); |
| 53 | 53 |
| 54 (*num_connections)++; | 54 (*num_connections)++; |
| 55 } | 55 } |
| 56 NOTREACHED(); | 56 NOTREACHED(); |
| 57 return E_UNEXPECTED; | 57 return E_UNEXPECTED; |
| 58 } | 58 } |
| 59 | 59 |
| 60 | 60 bool LogDisabler::DropMessageHandler(int severity, const char* file, int line, |
| 61 bool LogDisabler::DropMessageHandler(int severity, const std::string& str) { | 61 size_t message_start, const std::string& str) { |
| 62 // Message is handled, no further processing. |
| 62 return true; | 63 return true; |
| 63 } | 64 } |
| 64 | 65 |
| 65 LogDisabler::LogDisabler() { | 66 LogDisabler::LogDisabler() { |
| 66 old_handler_ = logging::GetLogMessageHandler(); | 67 old_handler_ = logging::GetLogMessageHandler(); |
| 67 logging::SetLogMessageHandler(DropMessageHandler); | 68 logging::SetLogMessageHandler(DropMessageHandler); |
| 68 } | 69 } |
| 69 | 70 |
| 70 LogDisabler::~LogDisabler() { | 71 LogDisabler::~LogDisabler() { |
| 71 logging::SetLogMessageHandler(old_handler_); | 72 logging::SetLogMessageHandler(old_handler_); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 << WideToUTF8(std::wstring(copy.bstrVal, ::SysStringLen(copy.bstrVal))) | 166 << WideToUTF8(std::wstring(copy.bstrVal, ::SysStringLen(copy.bstrVal))) |
| 166 << "\""; | 167 << "\""; |
| 167 } | 168 } |
| 168 | 169 |
| 169 *os << "}"; | 170 *os << "}"; |
| 170 } | 171 } |
| 171 | 172 |
| 172 } // namespace testing::internal | 173 } // namespace testing::internal |
| 173 | 174 |
| 174 } // namespace testing | 175 } // namespace testing |
| OLD | NEW |