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

Unified Diff: mojo/public/cpp/environment/tests/logging_unittest.cc

Issue 1997473005: Remove requirement that mojo::Environment be instantiated. (Closed) Base URL: https://github.com/domokit/mojo.git@work797_no_utility_tls
Patch Set: rebased Created 4 years, 7 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
Index: mojo/public/cpp/environment/tests/logging_unittest.cc
diff --git a/mojo/public/cpp/environment/tests/logging_unittest.cc b/mojo/public/cpp/environment/tests/logging_unittest.cc
index ab1de6450966ee8312fc07487740c27421e3bb89..e3af7aae55ed9449f56b72456f4acd0738c24285 100644
--- a/mojo/public/cpp/environment/tests/logging_unittest.cc
+++ b/mojo/public/cpp/environment/tests/logging_unittest.cc
@@ -30,7 +30,8 @@ bool DcheckTestHelper(bool* was_called) {
class LoggingTest : public testing::Test {
public:
- LoggingTest() : environment_(nullptr, &kMockLogger) {
+ LoggingTest() {
+ Environment::SetDefaultLogger(&kMockLogger);
minimum_log_level_ = MOJO_LOG_LEVEL_INFO;
ResetMockLogger();
}
@@ -82,8 +83,6 @@ class LoggingTest : public testing::Test {
minimum_log_level_ = minimum_log_level;
}
- Environment environment_;
-
static const MojoLogger kMockLogger;
static MojoLogLevel minimum_log_level_;
static bool log_message_was_called_;

Powered by Google App Engine
This is Rietveld 408576698