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

Side by Side Diff: jingle/glue/logging_unittest.cc

Issue 1002013010: Change include order in logging_unittest.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Note: this test tests LOG_V and LOG_E since all other logs are expressed 5 // Note: this test tests LOG_V and LOG_E since all other logs are expressed
6 // in forms of them. LOG is also tested for good measure. 6 // in forms of them. LOG is also tested for good measure.
7 // Also note that we are only allowed to call InitLogging() twice so the test 7 // Also note that we are only allowed to call InitLogging() twice so the test
8 // cases are more dense than normal. 8 // cases are more dense than normal.
9 9
10 // The following include must be first in this file. It ensures that 10 // We must include Chromium headers before including the overrides header
11 // since webrtc's logging.h file may conflict with chromium.
12 #include "base/command_line.h"
13 #include "base/files/file_util.h"
14 #include "testing/gtest/include/gtest/gtest.h"
15
16 // The following include come before including logging.h. It ensures that
11 // libjingle style logging is used. 17 // libjingle style logging is used.
12 #define LOGGING_INSIDE_WEBRTC 18 #define LOGGING_INSIDE_WEBRTC
13 19
14 #include "third_party/webrtc/overrides/webrtc/base/logging.h" 20 #include "third_party/webrtc/overrides/webrtc/base/logging.h"
15 21
16 #include "base/command_line.h"
17 #include "base/files/file_util.h"
18 #include "testing/gtest/include/gtest/gtest.h"
19
20 #if defined(OS_WIN) 22 #if defined(OS_WIN)
21 static const wchar_t* const log_file_name = L"libjingle_logging.log"; 23 static const wchar_t* const log_file_name = L"libjingle_logging.log";
22 #else 24 #else
23 static const char* const log_file_name = "libjingle_logging.log"; 25 static const char* const log_file_name = "libjingle_logging.log";
24 #endif 26 #endif
25 27
26 static const int kDefaultVerbosity = 0; 28 static const int kDefaultVerbosity = 0;
27 29
28 static const char* AsString(rtc::LoggingSeverity severity) { 30 static const char* AsString(rtc::LoggingSeverity severity) {
29 switch (severity) { 31 switch (severity) {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 EXPECT_TRUE(ContainsString(contents_of_file, 154 EXPECT_TRUE(ContainsString(contents_of_file,
153 AsString(rtc::LS_WARNING))); 155 AsString(rtc::LS_WARNING)));
154 EXPECT_TRUE(ContainsString(contents_of_file, AsString(rtc::LS_INFO))); 156 EXPECT_TRUE(ContainsString(contents_of_file, AsString(rtc::LS_INFO)));
155 // LOG_E 157 // LOG_E
156 EXPECT_TRUE(ContainsString(contents_of_file, strerror(kFakeError))); 158 EXPECT_TRUE(ContainsString(contents_of_file, strerror(kFakeError)));
157 EXPECT_TRUE(ContainsString(contents_of_file, 159 EXPECT_TRUE(ContainsString(contents_of_file,
158 AsString(rtc::LS_VERBOSE))); 160 AsString(rtc::LS_VERBOSE)));
159 EXPECT_TRUE(ContainsString(contents_of_file, 161 EXPECT_TRUE(ContainsString(contents_of_file,
160 AsString(rtc::LS_SENSITIVE))); 162 AsString(rtc::LS_SENSITIVE)));
161 } 163 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698