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

Side by Side Diff: ui/views/run_all_unittests.cc

Issue 176843008: Remove |disable_drawing| flag from GLSurface::InitializeOneOffForTests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rmdisabledraw: Created 6 years, 9 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/message_center/test/run_all_unittests.cc ('k') | 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/test/launcher/unit_test_launcher.h" 9 #include "base/test/launcher/unit_test_launcher.h"
10 #include "base/test/test_suite.h" 10 #include "base/test/test_suite.h"
11 #include "ui/base/resource/resource_bundle.h" 11 #include "ui/base/resource/resource_bundle.h"
12 #include "ui/base/ui_base_paths.h" 12 #include "ui/base/ui_base_paths.h"
13 #include "ui/gl/gl_surface.h" 13 #include "ui/gl/gl_surface.h"
14 14
15 class ViewTestSuite : public base::TestSuite { 15 class ViewTestSuite : public base::TestSuite {
16 public: 16 public:
17 ViewTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} 17 ViewTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
18 18
19 protected: 19 protected:
20 virtual void Initialize() OVERRIDE { 20 virtual void Initialize() OVERRIDE {
21 base::TestSuite::Initialize(); 21 base::TestSuite::Initialize();
22 gfx::GLSurface::InitializeOneOffForTests(true); 22 gfx::GLSurface::InitializeOneOffForTests();
23 ui::RegisterPathProvider(); 23 ui::RegisterPathProvider();
24 24
25 base::FilePath pak_dir; 25 base::FilePath pak_dir;
26 PathService::Get(base::DIR_MODULE, &pak_dir); 26 PathService::Get(base::DIR_MODULE, &pak_dir);
27 27
28 base::FilePath pak_file; 28 base::FilePath pak_file;
29 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak")); 29 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak"));
30 30
31 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); 31 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
32 } 32 }
33 33
34 virtual void Shutdown() OVERRIDE { 34 virtual void Shutdown() OVERRIDE {
35 ui::ResourceBundle::CleanupSharedInstance(); 35 ui::ResourceBundle::CleanupSharedInstance();
36 base::TestSuite::Shutdown(); 36 base::TestSuite::Shutdown();
37 } 37 }
38 38
39 private: 39 private:
40 DISALLOW_COPY_AND_ASSIGN(ViewTestSuite); 40 DISALLOW_COPY_AND_ASSIGN(ViewTestSuite);
41 }; 41 };
42 42
43 int main(int argc, char** argv) { 43 int main(int argc, char** argv) {
44 ViewTestSuite test_suite(argc, argv); 44 ViewTestSuite test_suite(argc, argv);
45 45
46 return base::LaunchUnitTests( 46 return base::LaunchUnitTests(
47 argc, argv, base::Bind(&ViewTestSuite::Run, 47 argc, argv, base::Bind(&ViewTestSuite::Run,
48 base::Unretained(&test_suite))); 48 base::Unretained(&test_suite)));
49 } 49 }
OLDNEW
« no previous file with comments | « ui/message_center/test/run_all_unittests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698