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

Unified Diff: mojo/public/cpp/environment/tests/logger_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/logger_unittest.cc
diff --git a/mojo/public/cpp/environment/tests/logger_unittest.cc b/mojo/public/cpp/environment/tests/logger_unittest.cc
index cf0e1c090bd18f346fd81db215bbde087e45e744..fcbc3ea80e6fc8dcd4513bb2a5e121ab48a52363 100644
--- a/mojo/public/cpp/environment/tests/logger_unittest.cc
+++ b/mojo/public/cpp/environment/tests/logger_unittest.cc
@@ -20,7 +20,6 @@ const MojoLogger kTestLogger = {
TEST(LoggerTest, Basic) {
const char kPath[] = "/fake/path/to/file.cc";
- Environment environment;
const MojoLogger* const logger = Environment::GetDefaultLogger();
logger->LogMessage(MOJO_LOG_LEVEL_VERBOSE - 1, kPath, 123,
@@ -42,7 +41,6 @@ TEST(LoggerTest, Basic) {
TEST(LoggerTest, LogLevels) {
const char kPath[] = "/fake/path/to/file.cc";
- Environment environment;
const MojoLogger* const logger = Environment::GetDefaultLogger();
for (MojoLogLevel log_level = MOJO_LOG_LEVEL_VERBOSE - 1;
@@ -74,7 +72,6 @@ TEST(LoggerTest, LogLevels) {
}
TEST(LoggerTest, NoFile) {
- Environment environment;
const MojoLogger* const logger = Environment::GetDefaultLogger();
logger->LogMessage(MOJO_LOG_LEVEL_VERBOSE - 1, nullptr, 0,
@@ -94,7 +91,6 @@ TEST(LoggerTest, NoFile) {
}
TEST(LoggerTest, SetDefaultLogger) {
- Environment environment;
Environment::SetDefaultLogger(&kTestLogger);
std::vector<std::string> expected_msgs;

Powered by Google App Engine
This is Rietveld 408576698