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

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

Issue 23147002: Enable high resolution time for TimeTicks::Now on Windows Canary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Simpler sleep & rebase Created 7 years, 3 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/threading/platform_thread_win.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 // 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 TestSuite::~TestSuite() { 93 TestSuite::~TestSuite() {
94 if (initialized_command_line_) 94 if (initialized_command_line_)
95 CommandLine::Reset(); 95 CommandLine::Reset();
96 } 96 }
97 97
98 void TestSuite::PreInitialize(int argc, char** argv, 98 void TestSuite::PreInitialize(int argc, char** argv,
99 bool create_at_exit_manager) { 99 bool create_at_exit_manager) {
100 #if defined(OS_WIN) 100 #if defined(OS_WIN)
101 testing::GTEST_FLAG(catch_exceptions) = false; 101 testing::GTEST_FLAG(catch_exceptions) = false;
102 base::TimeTicks::SetNowIsHighResNowIfSupported();
102 #endif 103 #endif
103 base::EnableTerminationOnHeapCorruption(); 104 base::EnableTerminationOnHeapCorruption();
104 initialized_command_line_ = CommandLine::Init(argc, argv); 105 initialized_command_line_ = CommandLine::Init(argc, argv);
105 testing::InitGoogleTest(&argc, argv); 106 testing::InitGoogleTest(&argc, argv);
106 #if defined(OS_LINUX) && defined(USE_AURA) 107 #if defined(OS_LINUX) && defined(USE_AURA)
107 // When calling native char conversion functions (e.g wrctomb) we need to 108 // When calling native char conversion functions (e.g wrctomb) we need to
108 // have the locale set. In the absence of such a call the "C" locale is the 109 // have the locale set. In the absence of such a call the "C" locale is the
109 // default. In the gtk code (below) gtk_init() implicitly sets a locale. 110 // default. In the gtk code (below) gtk_init() implicitly sets a locale.
110 setlocale(LC_ALL, ""); 111 setlocale(LC_ALL, "");
111 #elif defined(TOOLKIT_GTK) 112 #elif defined(TOOLKIT_GTK)
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 ResetCommandLine(); 284 ResetCommandLine();
284 #if !defined(OS_IOS) 285 #if !defined(OS_IOS)
285 AddTestLauncherResultPrinter(); 286 AddTestLauncherResultPrinter();
286 #endif // !defined(OS_IOS) 287 #endif // !defined(OS_IOS)
287 288
288 TestTimeouts::Initialize(); 289 TestTimeouts::Initialize();
289 } 290 }
290 291
291 void TestSuite::Shutdown() { 292 void TestSuite::Shutdown() {
292 } 293 }
OLDNEW
« no previous file with comments | « base/profiler/tracked_time.cc ('k') | base/threading/platform_thread_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698