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

Side by Side Diff: chrome/browser/android/vr_shell/run_all_unittests.cc

Issue 2937263002: VR: Support loading string resources in unit tests. (Closed)
Patch Set: Remove test string used to validate change through the trybots. Created 3 years, 6 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/bind.h"
6 #include "base/files/file_util.h"
7 #include "base/path_service.h"
8 #include "base/test/launcher/unit_test_launcher.h"
9 #include "base/test/test_suite.h"
10 #include "ui/base/resource/resource_bundle.h"
11 #include "ui/base/ui_base_paths.h"
12
13 namespace {
14
15 class VrCommonTestSuite : public base::TestSuite {
16 public:
17 VrCommonTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
18
19 protected:
20 void Initialize() override {
21 base::TestSuite::Initialize();
22
23 ui::RegisterPathProvider();
24
25 base::FilePath pak_path;
26 #if defined(OS_ANDROID)
27 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &pak_path);
28 #else
29 PathService::Get(base::DIR_MODULE, &pak_path);
30 #endif
31 ui::ResourceBundle::InitSharedInstanceWithPakPath(
32 pak_path.AppendASCII("components_tests_resources.pak"));
33 }
34
35 void Shutdown() override {
36 ui::ResourceBundle::CleanupSharedInstance();
37 base::TestSuite::Shutdown();
38 }
39
40 private:
41 DISALLOW_COPY_AND_ASSIGN(VrCommonTestSuite);
42 };
43
44 } // namespace
45
46 int main(int argc, char** argv) {
47 VrCommonTestSuite test_suite(argc, argv);
48
49 return base::LaunchUnitTests(
50 argc, argv,
51 base::Bind(&VrCommonTestSuite::Run, base::Unretained(&test_suite)));
52 }
OLDNEW
« chrome/browser/android/vr_shell/BUILD.gn ('K') | « chrome/browser/android/vr_shell/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698