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

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

Issue 2528013002: Initialize the message center as part of the testing browser process (Closed)
Patch Set: re-uploding due to time outs Created 4 years 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 | « ash/test/BUILD.gn ('k') | ash/test/ash_test_helper.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_interactive_ui_test_base.h" 5 #include "ash/test/ash_interactive_ui_test_base.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "ui/aura/env.h" 8 #include "ui/aura/env.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/base/ui_base_paths.h" 10 #include "ui/base/ui_base_paths.h"
11 #include "ui/gl/test/gl_surface_test_support.h" 11 #include "ui/gl/test/gl_surface_test_support.h"
12 #include "ui/message_center/message_center.h"
12 13
13 namespace ash { 14 namespace ash {
14 namespace test { 15 namespace test {
15 16
16 AshInteractiveUITestBase::AshInteractiveUITestBase() {} 17 AshInteractiveUITestBase::AshInteractiveUITestBase() {}
17 18
18 AshInteractiveUITestBase::~AshInteractiveUITestBase() {} 19 AshInteractiveUITestBase::~AshInteractiveUITestBase() {}
19 20
20 void AshInteractiveUITestBase::SetUp() { 21 void AshInteractiveUITestBase::SetUp() {
21 gl::GLSurfaceTestSupport::InitializeOneOff(); 22 gl::GLSurfaceTestSupport::InitializeOneOff();
22 23
23 ui::RegisterPathProvider(); 24 ui::RegisterPathProvider();
24 ui::ResourceBundle::InitSharedInstanceWithLocale( 25 ui::ResourceBundle::InitSharedInstanceWithLocale(
25 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); 26 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
26 base::FilePath resources_pack_path; 27 base::FilePath resources_pack_path;
27 PathService::Get(base::DIR_MODULE, &resources_pack_path); 28 PathService::Get(base::DIR_MODULE, &resources_pack_path);
28 resources_pack_path = 29 resources_pack_path =
29 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); 30 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak"));
30 ResourceBundle::GetSharedInstance().AddDataPackFromPath( 31 ResourceBundle::GetSharedInstance().AddDataPackFromPath(
31 resources_pack_path, ui::SCALE_FACTOR_NONE); 32 resources_pack_path, ui::SCALE_FACTOR_NONE);
32 env_ = aura::Env::CreateInstance(); 33 env_ = aura::Env::CreateInstance();
33 34 message_center::MessageCenter::Initialize();
34 test::AshTestBase::SetUp(); 35 test::AshTestBase::SetUp();
35 } 36 }
36 37
37 void AshInteractiveUITestBase::TearDown() { 38 void AshInteractiveUITestBase::TearDown() {
38 test::AshTestBase::TearDown(); 39 test::AshTestBase::TearDown();
40 message_center::MessageCenter::Shutdown();
39 env_.reset(); 41 env_.reset();
40 } 42 }
41 43
42 } // namespace test 44 } // namespace test
43 } // namespace ash 45 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/BUILD.gn ('k') | ash/test/ash_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698