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

Side by Side Diff: ash/test/ash_test_suite.cc

Issue 2901703002: chromeos: Initialize StatisticsRecorder in AshTestSuite (Closed)
Patch Set: Created 3 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 | « 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 #include "ash/test/ash_test_suite.h" 5 #include "ash/test/ash_test_suite.h"
6 6
7 #include "ash/public/cpp/config.h" 7 #include "ash/public/cpp/config.h"
8 #include "ash/test/ash_test_environment.h" 8 #include "ash/test/ash_test_environment.h"
9 #include "ash/test/ash_test_helper.h" 9 #include "ash/test/ash_test_helper.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
13 #include "base/metrics/statistics_recorder.h"
13 #include "base/path_service.h" 14 #include "base/path_service.h"
14 #include "build/build_config.h" 15 #include "build/build_config.h"
15 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
16 #include "ui/base/resource/resource_bundle.h" 17 #include "ui/base/resource/resource_bundle.h"
17 #include "ui/base/ui_base_paths.h" 18 #include "ui/base/ui_base_paths.h"
18 #include "ui/compositor/test/fake_context_factory.h" 19 #include "ui/compositor/test/fake_context_factory.h"
19 #include "ui/gfx/gfx_paths.h" 20 #include "ui/gfx/gfx_paths.h"
20 #include "ui/gl/test/gl_surface_test_support.h" 21 #include "ui/gl/test/gl_surface_test_support.h"
21 22
22 namespace ash { 23 namespace ash {
23 namespace test { 24 namespace test {
24 25
25 AshTestSuite::AshTestSuite(int argc, char** argv) : TestSuite(argc, argv) {} 26 AshTestSuite::AshTestSuite(int argc, char** argv) : TestSuite(argc, argv) {}
26 27
27 AshTestSuite::~AshTestSuite() {} 28 AshTestSuite::~AshTestSuite() {}
28 29
29 void AshTestSuite::Initialize() { 30 void AshTestSuite::Initialize() {
30 base::TestSuite::Initialize(); 31 base::TestSuite::Initialize();
32 // Ensure histograms hit during tests are registered properly.
33 base::StatisticsRecorder::Initialize();
31 gl::GLSurfaceTestSupport::InitializeOneOff(); 34 gl::GLSurfaceTestSupport::InitializeOneOff();
32 35
33 gfx::RegisterPathProvider(); 36 gfx::RegisterPathProvider();
34 ui::RegisterPathProvider(); 37 ui::RegisterPathProvider();
35 38
36 // Force unittests to run using en-US so if we test against string output, 39 // Force unittests to run using en-US so if we test against string output,
37 // it'll pass regardless of the system language. 40 // it'll pass regardless of the system language.
38 base::i18n::SetICUDefaultLocale("en_US"); 41 base::i18n::SetICUDefaultLocale("en_US");
39 42
40 // Load ash test resources and en-US strings; not 'common' (Chrome) resources. 43 // Load ash test resources and en-US strings; not 'common' (Chrome) resources.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 75 }
73 76
74 void AshTestSuite::Shutdown() { 77 void AshTestSuite::Shutdown() {
75 env_.reset(); 78 env_.reset();
76 ui::ResourceBundle::CleanupSharedInstance(); 79 ui::ResourceBundle::CleanupSharedInstance();
77 base::TestSuite::Shutdown(); 80 base::TestSuite::Shutdown();
78 } 81 }
79 82
80 } // namespace test 83 } // namespace test
81 } // namespace ash 84 } // namespace ash
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