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

Side by Side Diff: webrtc/test/test_main.cc

Issue 1915523002: Add a default implementation in metrics_default.cc of histograms methods in system_wrappers/interfac (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « webrtc/test/test.gyp ('k') | webrtc/test/test_suite.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 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "gflags/gflags.h" 11 #include "gflags/gflags.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "webrtc/base/logging.h" 13 #include "webrtc/base/logging.h"
14 #include "webrtc/system_wrappers/include/metrics_default.h"
14 #include "webrtc/test/field_trial.h" 15 #include "webrtc/test/field_trial.h"
15 #include "webrtc/test/testsupport/fileutils.h" 16 #include "webrtc/test/testsupport/fileutils.h"
16 17
17 DEFINE_string(force_fieldtrials, "", 18 DEFINE_string(force_fieldtrials, "",
18 "Field trials control experimental feature code which can be forced. " 19 "Field trials control experimental feature code which can be forced. "
19 "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/" 20 "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/"
20 " will assign the group Enable to field trial WebRTC-FooFeature."); 21 " will assign the group Enable to field trial WebRTC-FooFeature.");
21 22
22 int main(int argc, char* argv[]) { 23 int main(int argc, char* argv[]) {
23 ::testing::InitGoogleTest(&argc, argv); 24 ::testing::InitGoogleTest(&argc, argv);
24 25
25 // Default to LS_INFO, even for release builds to provide better test logging. 26 // Default to LS_INFO, even for release builds to provide better test logging.
26 // TODO(pbos): Consider adding a command-line override. 27 // TODO(pbos): Consider adding a command-line override.
27 if (rtc::LogMessage::GetLogToDebug() > rtc::LS_INFO) 28 if (rtc::LogMessage::GetLogToDebug() > rtc::LS_INFO)
28 rtc::LogMessage::LogToDebug(rtc::LS_INFO); 29 rtc::LogMessage::LogToDebug(rtc::LS_INFO);
29 30
30 // AllowCommandLineParsing allows us to ignore flags passed on to us by 31 // AllowCommandLineParsing allows us to ignore flags passed on to us by
31 // Chromium build bots without having to explicitly disable them. 32 // Chromium build bots without having to explicitly disable them.
32 google::AllowCommandLineReparsing(); 33 google::AllowCommandLineReparsing();
33 google::ParseCommandLineFlags(&argc, &argv, false); 34 google::ParseCommandLineFlags(&argc, &argv, false);
34 35
35 webrtc::test::SetExecutablePath(argv[0]); 36 webrtc::test::SetExecutablePath(argv[0]);
36 webrtc::test::InitFieldTrialsFromString(FLAGS_force_fieldtrials); 37 webrtc::test::InitFieldTrialsFromString(FLAGS_force_fieldtrials);
38 webrtc::metrics::Enable();
37 return RUN_ALL_TESTS(); 39 return RUN_ALL_TESTS();
38 } 40 }
OLDNEW
« no previous file with comments | « webrtc/test/test.gyp ('k') | webrtc/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698