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

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

Issue 4390001: Fix the testing::LogDisabler for the change r64883. See http://codereview.chr... (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/logging.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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
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 int initial_log_level_; 70 logging::LogMessageHandlerFunction old_handler_;
71 static bool DropMessageHandler(int severity, const std::string& str);
71 }; 72 };
72 73
73 // Overrides a path in the PathService singleton, replacing the 74 // Overrides a path in the PathService singleton, replacing the
74 // original at the end of its lifetime. 75 // original at the end of its lifetime.
75 class PathServiceOverrider { 76 class PathServiceOverrider {
76 public: 77 public:
77 PathServiceOverrider(int key, const FilePath& path); 78 PathServiceOverrider(int key, const FilePath& path);
78 ~PathServiceOverrider(); 79 ~PathServiceOverrider();
79 80
80 private: 81 private:
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 TEST_F(test_fixture, test_name) 306 TEST_F(test_fixture, test_name)
306 #else 307 #else
307 #define TEST_DEBUG_ONLY(test_case_name, test_name) \ 308 #define TEST_DEBUG_ONLY(test_case_name, test_name) \
308 void DisabledTest##test_case_name##test_name() 309 void DisabledTest##test_case_name##test_name()
309 #define TEST_F_DEBUG_ONLY TEST_DEBUG_ONLY 310 #define TEST_F_DEBUG_ONLY TEST_DEBUG_ONLY
310 #endif 311 #endif
311 312
312 313
313 314
314 #endif // CEEE_TESTING_UTILS_TEST_UTILS_H_ 315 #endif // CEEE_TESTING_UTILS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « base/logging.cc ('k') | ceee/testing/utils/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698