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

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

Issue 168193003: ui: message_center and app_list tests opt into real GL NullDraw contexts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nulldraw-applistmessagecenter: Created 6 years, 10 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/DEPS ('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 2014 The Chromium Authors. All rights reserved. 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 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 13
14 #if !defined(OS_MACOSX)
15 #include "ui/gl/gl_surface.h"
16 #endif
17
14 namespace { 18 namespace {
15 19
16 class MessageCenterTestSuite : public base::TestSuite { 20 class MessageCenterTestSuite : public base::TestSuite {
17 public: 21 public:
18 MessageCenterTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} 22 MessageCenterTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
19 23
20 protected: 24 protected:
21 virtual void Initialize() OVERRIDE { 25 virtual void Initialize() OVERRIDE {
26 #if !defined(OS_MACOSX)
27 gfx::GLSurface::InitializeOneOffForTests(true);
28 #endif
22 base::TestSuite::Initialize(); 29 base::TestSuite::Initialize();
23 ui::RegisterPathProvider(); 30 ui::RegisterPathProvider();
24 31
25 base::FilePath pak_dir; 32 base::FilePath pak_dir;
26 PathService::Get(base::DIR_MODULE, &pak_dir); 33 PathService::Get(base::DIR_MODULE, &pak_dir);
27 34
28 base::FilePath pak_file; 35 base::FilePath pak_file;
29 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak")); 36 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak"));
30 37
31 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); 38 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
(...skipping 11 matching lines...) Expand all
43 } // namespace 50 } // namespace
44 51
45 int main(int argc, char** argv) { 52 int main(int argc, char** argv) {
46 MessageCenterTestSuite test_suite(argc, argv); 53 MessageCenterTestSuite test_suite(argc, argv);
47 54
48 return base::LaunchUnitTests( 55 return base::LaunchUnitTests(
49 argc, 56 argc,
50 argv, 57 argv,
51 base::Bind(&MessageCenterTestSuite::Run, base::Unretained(&test_suite))); 58 base::Bind(&MessageCenterTestSuite::Run, base::Unretained(&test_suite)));
52 } 59 }
OLDNEW
« no previous file with comments | « ui/message_center/test/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698