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

Unified Diff: jingle/glue/logging_unittest.cc

Issue 1136483003: Roll WebRTC 9187:9189 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include updated test expectations Created 5 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
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/glue/logging_unittest.cc
diff --git a/jingle/glue/logging_unittest.cc b/jingle/glue/logging_unittest.cc
index 579832f6282736688d11a4993628eea69ef09d8f..96401784b9776cd1d3213cd11da9c54557fe748d 100644
--- a/jingle/glue/logging_unittest.cc
+++ b/jingle/glue/logging_unittest.cc
@@ -76,7 +76,7 @@ static bool Initialize(int verbosity_level) {
TEST(LibjingleLogTest, DefaultConfiguration) {
ASSERT_TRUE(Initialize(kDefaultVerbosity));
- // In the default configuration nothing should be logged.
+ // In the default configuration only warnings and errors should be logged.
LOG_V(rtc::LS_ERROR) << AsString(rtc::LS_ERROR);
LOG_V(rtc::LS_WARNING) << AsString(rtc::LS_WARNING);
LOG_V(rtc::LS_INFO) << AsString(rtc::LS_INFO);
@@ -89,9 +89,8 @@ TEST(LibjingleLogTest, DefaultConfiguration) {
base::ReadFileToString(file_path, &contents_of_file);
// Make sure string contains the expected values.
- EXPECT_FALSE(ContainsString(contents_of_file, AsString(rtc::LS_ERROR)));
- EXPECT_FALSE(ContainsString(contents_of_file,
- AsString(rtc::LS_WARNING)));
+ EXPECT_TRUE(ContainsString(contents_of_file, AsString(rtc::LS_ERROR)));
+ EXPECT_TRUE(ContainsString(contents_of_file, AsString(rtc::LS_WARNING)));
EXPECT_FALSE(ContainsString(contents_of_file, AsString(rtc::LS_INFO)));
EXPECT_FALSE(ContainsString(contents_of_file,
AsString(rtc::LS_VERBOSE)));
@@ -100,7 +99,7 @@ TEST(LibjingleLogTest, DefaultConfiguration) {
}
TEST(LibjingleLogTest, InfoConfiguration) {
- ASSERT_TRUE(Initialize(rtc::LS_INFO));
tommi (sloooow) - chröme 2015/05/14 02:27:23 rtc::LS_INFO was incorrect since rtc::LS_INFO == 3
+ ASSERT_TRUE(Initialize(0)); // 0 == Chrome's 'info' level.
// In this configuration everything lower or equal to LS_INFO should be
// logged.
@@ -119,7 +118,7 @@ TEST(LibjingleLogTest, InfoConfiguration) {
EXPECT_TRUE(ContainsString(contents_of_file, AsString(rtc::LS_ERROR)));
EXPECT_TRUE(ContainsString(contents_of_file,
AsString(rtc::LS_WARNING)));
- EXPECT_TRUE(ContainsString(contents_of_file, AsString(rtc::LS_INFO)));
+ EXPECT_FALSE(ContainsString(contents_of_file, AsString(rtc::LS_INFO)));
EXPECT_FALSE(ContainsString(contents_of_file,
AsString(rtc::LS_VERBOSE)));
EXPECT_FALSE(ContainsString(contents_of_file,
@@ -132,7 +131,7 @@ TEST(LibjingleLogTest, InfoConfiguration) {
}
TEST(LibjingleLogTest, LogEverythingConfiguration) {
- ASSERT_TRUE(Initialize(rtc::LS_SENSITIVE));
tommi (sloooow) - chröme 2015/05/14 02:27:23 This was also incorrect since LS_SENSITIVE==5
+ ASSERT_TRUE(Initialize(2)); // verbosity at level 2 allows LS_SENSITIVE.
// In this configuration everything should be logged.
LOG_V(rtc::LS_ERROR) << AsString(rtc::LS_ERROR);
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698