OLD | NEW |
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/gfx/compositor/test/test_suite.h" | 5 #include "ui/gfx/compositor/test/test_suite.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
9 #include "ui/base/resource/resource_bundle.h" | 9 #include "ui/base/resource/resource_bundle.h" |
10 #include "ui/base/ui_base_paths.h" | 10 #include "ui/base/ui_base_paths.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 void CompositorTestSuite::Initialize() { | 24 void CompositorTestSuite::Initialize() { |
25 #if defined(OS_LINUX) | 25 #if defined(OS_LINUX) |
26 gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL); | 26 gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL); |
27 #endif | 27 #endif |
28 base::TestSuite::Initialize(); | 28 base::TestSuite::Initialize(); |
29 | 29 |
30 gfx::RegisterPathProvider(); | 30 gfx::RegisterPathProvider(); |
31 ui::RegisterPathProvider(); | 31 ui::RegisterPathProvider(); |
32 | 32 |
33 // Force unittests to run using en-US so if we test against string | |
34 // output, it'll pass regardless of the system language. | |
35 ui::ResourceBundle::InitSharedInstance("en-US"); | |
36 | |
37 message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI)); | 33 message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI)); |
38 ui::CompositorTestSupport::Initialize(); | 34 ui::CompositorTestSupport::Initialize(); |
39 } | 35 } |
40 | 36 |
41 void CompositorTestSuite::Shutdown() { | 37 void CompositorTestSuite::Shutdown() { |
42 ui::CompositorTestSupport::Terminate(); | 38 ui::CompositorTestSupport::Terminate(); |
43 message_loop_.reset(); | 39 message_loop_.reset(); |
44 | 40 |
45 ui::ResourceBundle::CleanupSharedInstance(); | 41 ui::ResourceBundle::CleanupSharedInstance(); |
46 | 42 |
47 base::TestSuite::Shutdown(); | 43 base::TestSuite::Shutdown(); |
48 } | 44 } |
OLD | NEW |