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

Side by Side Diff: ceee/testing/utils/test_utils.h

Issue 4164011: Integrate ETW with VLOG logging. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | « base/vlog_unittest.cc ('k') | ceee/testing/utils/test_utils.cc » ('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) 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 #ifndef CEEE_TESTING_UTILS_TEST_UTILS_H_ 7 #ifndef CEEE_TESTING_UTILS_TEST_UTILS_H_
8 #define CEEE_TESTING_UTILS_TEST_UTILS_H_ 8 #define CEEE_TESTING_UTILS_TEST_UTILS_H_
9 9
10 #include <atlbase.h> 10 #include <atlbase.h>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 // Prevents any logging actions (DCHECKs, killing the process, 62 // Prevents any logging actions (DCHECKs, killing the process,
63 // informational output, or anything) for the scope of its lifetime. 63 // informational output, or anything) for the scope of its lifetime.
64 class LogDisabler { 64 class LogDisabler {
65 public: 65 public:
66 LogDisabler(); 66 LogDisabler();
67 ~LogDisabler(); 67 ~LogDisabler();
68 68
69 private: 69 private:
70 logging::LogMessageHandlerFunction old_handler_; 70 logging::LogMessageHandlerFunction old_handler_;
71 static bool DropMessageHandler(int severity, const std::string& str); 71 static bool DropMessageHandler(int severity, const char* file, int line,
72 size_t message_start, const std::string& str);
72 }; 73 };
73 74
74 // Overrides a path in the PathService singleton, replacing the 75 // Overrides a path in the PathService singleton, replacing the
75 // original at the end of its lifetime. 76 // original at the end of its lifetime.
76 class PathServiceOverrider { 77 class PathServiceOverrider {
77 public: 78 public:
78 PathServiceOverrider(int key, const FilePath& path); 79 PathServiceOverrider(int key, const FilePath& path);
79 ~PathServiceOverrider(); 80 ~PathServiceOverrider();
80 81
81 private: 82 private:
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 TEST_F(test_fixture, test_name) 307 TEST_F(test_fixture, test_name)
307 #else 308 #else
308 #define TEST_DEBUG_ONLY(test_case_name, test_name) \ 309 #define TEST_DEBUG_ONLY(test_case_name, test_name) \
309 void DisabledTest##test_case_name##test_name() 310 void DisabledTest##test_case_name##test_name()
310 #define TEST_F_DEBUG_ONLY TEST_DEBUG_ONLY 311 #define TEST_F_DEBUG_ONLY TEST_DEBUG_ONLY
311 #endif 312 #endif
312 313
313 314
314 315
315 #endif // CEEE_TESTING_UTILS_TEST_UTILS_H_ 316 #endif // CEEE_TESTING_UTILS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « base/vlog_unittest.cc ('k') | ceee/testing/utils/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698