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

Side by Side Diff: ui/gfx/test/run_all_unittests.cc

Issue 291753002: Reland "Move a good set of gfx unit tests into gfx_unittests target." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move to gfx Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/test/DEPS ('k') | ui/ui_unittests.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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/basictypes.h"
6 #include "base/bind.h"
7 #include "base/compiler_specific.h"
8 #include "base/path_service.h"
9 #include "base/test/launcher/unit_test_launcher.h"
10 #include "base/test/test_suite.h"
11 #include "ui/base/resource/resource_bundle.h"
12 #include "ui/base/ui_base_paths.h"
13
14 namespace {
15
16 class GfxTestSuite : public base::TestSuite {
17 public:
18 GfxTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
19
20 protected:
21 virtual void Initialize() OVERRIDE {
22 base::TestSuite::Initialize();
23 ui::RegisterPathProvider();
24
25 base::FilePath pak_dir;
26 PathService::Get(base::DIR_MODULE, &pak_dir);
27
28 base::FilePath pak_file;
29 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak"));
30
31 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
sadrul 2014/05/21 18:49:10 Does the gfx tests actually use anything from the
tfarina 2014/05/21 19:03:35 Yes. Both font_unittests.cc and text_elider_unitte
sadrul 2014/05/21 19:10:21 Ah, I see. That seems unfortunate. Perhaps we coul
tfarina 2014/05/21 19:28:54 For further reference the error (without this call
32 }
33
34 virtual void Shutdown() OVERRIDE {
35 ui::ResourceBundle::CleanupSharedInstance();
36 base::TestSuite::Shutdown();
37 }
38
39 private:
40 DISALLOW_COPY_AND_ASSIGN(GfxTestSuite);
41 };
42
43 } // namespace
44
45 int main(int argc, char** argv) {
46 GfxTestSuite test_suite(argc, argv);
47
48 return base::LaunchUnitTests(
49 argc,
50 argv,
51 base::Bind(&GfxTestSuite::Run, base::Unretained(&test_suite)));
52 }
OLDNEW
« no previous file with comments | « ui/gfx/test/DEPS ('k') | ui/ui_unittests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698