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

Side by Side Diff: ui/aura_shell/test_suite.cc

Issue 8873001: Revert 113470 - Makes tests either use mock compositor or mock WebGraphicsContext3D depending upo... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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/aura_shell/aura_shell.gyp ('k') | ui/gfx/compositor/compositor.gyp » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/aura_shell/test_suite.h" 5 #include "ui/aura_shell/test_suite.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
11 #include "ui/base/ui_base_paths.h" 11 #include "ui/base/ui_base_paths.h"
12 #include "ui/gfx/compositor/test/compositor_test_support.h" 12 #include "ui/gfx/compositor/test/compositor_test_support.h"
13 #include "ui/gfx/gfx_paths.h" 13 #include "ui/gfx/gfx_paths.h"
14
15 #if defined(USE_WEBKIT_COMPOSITOR)
16 #include "ui/gfx/compositor/compositor_setup.h"
17 #else
18 #include "ui/gfx/test/gfx_test_utils.h" 14 #include "ui/gfx/test/gfx_test_utils.h"
19 #endif
20 15
21 namespace aura_shell { 16 namespace aura_shell {
22 namespace test { 17 namespace test {
23 18
24 AuraShellTestSuite::AuraShellTestSuite(int argc, char** argv) 19 AuraShellTestSuite::AuraShellTestSuite(int argc, char** argv)
25 : TestSuite(argc, argv) {} 20 : TestSuite(argc, argv) {}
26 21
27 void AuraShellTestSuite::Initialize() { 22 void AuraShellTestSuite::Initialize() {
28 base::TestSuite::Initialize(); 23 base::TestSuite::Initialize();
29 24
30 gfx::RegisterPathProvider(); 25 gfx::RegisterPathProvider();
31 ui::RegisterPathProvider(); 26 ui::RegisterPathProvider();
32 27
33 // Force unittests to run using en-US so if we test against string 28 // Force unittests to run using en-US so if we test against string
34 // output, it'll pass regardless of the system language. 29 // output, it'll pass regardless of the system language.
35 ui::ResourceBundle::InitSharedInstance("en-US"); 30 ui::ResourceBundle::InitSharedInstance("en-US");
36 ui::CompositorTestSupport::Initialize(); 31 ui::CompositorTestSupport::Initialize();
37 #if defined(USE_WEBKIT_COMPOSITOR)
38 ui::SetupTestCompositor();
39 #else
40 ui::gfx_test_utils::SetupTestCompositor(); 32 ui::gfx_test_utils::SetupTestCompositor();
41 #endif
42 } 33 }
43 34
44 void AuraShellTestSuite::Shutdown() { 35 void AuraShellTestSuite::Shutdown() {
45 ui::CompositorTestSupport::Terminate(); 36 ui::CompositorTestSupport::Terminate();
46 ui::ResourceBundle::CleanupSharedInstance(); 37 ui::ResourceBundle::CleanupSharedInstance();
47 38
48 base::TestSuite::Shutdown(); 39 base::TestSuite::Shutdown();
49 } 40 }
50 41
51 } // namespace test 42 } // namespace test
52 } // namespace aura_shell 43 } // namespace aura_shell
OLDNEW
« no previous file with comments | « ui/aura_shell/aura_shell.gyp ('k') | ui/gfx/compositor/compositor.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698