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

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

Issue 446203002: Initialize the now_funciton to the HighResNowWrapper in case High Res is supported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the now_function static Initializer Created 6 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 | « no previous file | 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/bind.h" 10 #include "base/bind.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // Windows CommandLine::Init ignores argv anyway. 128 // Windows CommandLine::Init ignores argv anyway.
129 initialized_command_line_ = CommandLine::Init(argc, NULL); 129 initialized_command_line_ = CommandLine::Init(argc, NULL);
130 testing::InitGoogleTest(&argc, argv); 130 testing::InitGoogleTest(&argc, argv);
131 testing::InitGoogleMock(&argc, argv); 131 testing::InitGoogleMock(&argc, argv);
132 } 132 }
133 #endif // defined(OS_WIN) 133 #endif // defined(OS_WIN)
134 134
135 void TestSuite::PreInitialize(bool create_at_exit_manager) { 135 void TestSuite::PreInitialize(bool create_at_exit_manager) {
136 #if defined(OS_WIN) 136 #if defined(OS_WIN)
137 testing::GTEST_FLAG(catch_exceptions) = false; 137 testing::GTEST_FLAG(catch_exceptions) = false;
138 base::TimeTicks::SetNowIsHighResNowIfSupported();
139 #endif 138 #endif
140 base::EnableTerminationOnHeapCorruption(); 139 base::EnableTerminationOnHeapCorruption();
141 #if defined(OS_LINUX) && defined(USE_AURA) 140 #if defined(OS_LINUX) && defined(USE_AURA)
142 // When calling native char conversion functions (e.g wrctomb) we need to 141 // When calling native char conversion functions (e.g wrctomb) we need to
143 // have the locale set. In the absence of such a call the "C" locale is the 142 // have the locale set. In the absence of such a call the "C" locale is the
144 // default. In the gtk code (below) gtk_init() implicitly sets a locale. 143 // default. In the gtk code (below) gtk_init() implicitly sets a locale.
145 setlocale(LC_ALL, ""); 144 setlocale(LC_ALL, "");
146 #endif // defined(OS_LINUX) && defined(USE_AURA) 145 #endif // defined(OS_LINUX) && defined(USE_AURA)
147 146
148 // On Android, AtExitManager is created in 147 // On Android, AtExitManager is created in
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 ResetCommandLine(); 334 ResetCommandLine();
336 #if !defined(OS_IOS) 335 #if !defined(OS_IOS)
337 AddTestLauncherResultPrinter(); 336 AddTestLauncherResultPrinter();
338 #endif // !defined(OS_IOS) 337 #endif // !defined(OS_IOS)
339 338
340 TestTimeouts::Initialize(); 339 TestTimeouts::Initialize();
341 } 340 }
342 341
343 void TestSuite::Shutdown() { 342 void TestSuite::Shutdown() {
344 } 343 }
OLDNEW
« no previous file with comments | « no previous file | base/time/time.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698