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

Side by Side Diff: base/test/test_suite.cc

Issue 16896018: Enable high resolution time for TimeTicks::Now on Windows Canary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rename (retry) Created 7 years, 4 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 | « base/profiler/tracked_time.cc ('k') | base/time/time.h » ('j') | 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 #include "base/test/test_suite.h" 5 #include "base/test/test_suite.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/base_paths.h" 8 #include "base/base_paths.h"
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 TestSuite::~TestSuite() { 90 TestSuite::~TestSuite() {
91 if (initialized_command_line_) 91 if (initialized_command_line_)
92 CommandLine::Reset(); 92 CommandLine::Reset();
93 } 93 }
94 94
95 void TestSuite::PreInitialize(int argc, char** argv, 95 void TestSuite::PreInitialize(int argc, char** argv,
96 bool create_at_exit_manager) { 96 bool create_at_exit_manager) {
97 #if defined(OS_WIN) 97 #if defined(OS_WIN)
98 testing::GTEST_FLAG(catch_exceptions) = false; 98 testing::GTEST_FLAG(catch_exceptions) = false;
99 base::TimeTicks::SetNowIsHighResNowIfSupported();
99 #endif 100 #endif
100 base::EnableTerminationOnHeapCorruption(); 101 base::EnableTerminationOnHeapCorruption();
101 initialized_command_line_ = CommandLine::Init(argc, argv); 102 initialized_command_line_ = CommandLine::Init(argc, argv);
102 testing::InitGoogleTest(&argc, argv); 103 testing::InitGoogleTest(&argc, argv);
103 #if defined(OS_LINUX) && defined(USE_AURA) 104 #if defined(OS_LINUX) && defined(USE_AURA)
104 // When calling native char conversion functions (e.g wrctomb) we need to 105 // When calling native char conversion functions (e.g wrctomb) we need to
105 // have the locale set. In the absence of such a call the "C" locale is the 106 // have the locale set. In the absence of such a call the "C" locale is the
106 // default. In the gtk code (below) gtk_init() implicitly sets a locale. 107 // default. In the gtk code (below) gtk_init() implicitly sets a locale.
107 setlocale(LC_ALL, ""); 108 setlocale(LC_ALL, "");
108 #elif defined(TOOLKIT_GTK) 109 #elif defined(TOOLKIT_GTK)
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 icu_util::Initialize(); 250 icu_util::Initialize();
250 251
251 CatchMaybeTests(); 252 CatchMaybeTests();
252 ResetCommandLine(); 253 ResetCommandLine();
253 254
254 TestTimeouts::Initialize(); 255 TestTimeouts::Initialize();
255 } 256 }
256 257
257 void TestSuite::Shutdown() { 258 void TestSuite::Shutdown() {
258 } 259 }
OLDNEW
« no previous file with comments | « base/profiler/tracked_time.cc ('k') | base/time/time.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698