forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathash_interactive_ui_test_base.cc
43 lines (33 loc) · 1.27 KB
/
ash_interactive_ui_test_base.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/test/ash_interactive_ui_test_base.h"
#include "base/path_service.h"
#include "ui/aura/env.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/gl/test/gl_surface_test_support.h"
namespace ash {
namespace test {
AshInteractiveUITestBase::AshInteractiveUITestBase() {}
AshInteractiveUITestBase::~AshInteractiveUITestBase() {}
void AshInteractiveUITestBase::SetUp() {
gl::GLSurfaceTestSupport::InitializeOneOff();
ui::RegisterPathProvider();
ui::ResourceBundle::InitSharedInstanceWithLocale(
"en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
base::FilePath resources_pack_path;
PathService::Get(base::DIR_MODULE, &resources_pack_path);
resources_pack_path =
resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak"));
ResourceBundle::GetSharedInstance().AddDataPackFromPath(
resources_pack_path, ui::SCALE_FACTOR_NONE);
env_ = aura::Env::CreateInstance();
test::AshTestBase::SetUp();
}
void AshInteractiveUITestBase::TearDown() {
test::AshTestBase::TearDown();
env_.reset();
}
} // namespace test
} // namespace ash