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

Side by Side Diff: ui/gfx/compositor/test_suite.cc

Issue 8222028: Use WebKit compositor in ui::Layer (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase,fixes Created 9 years, 2 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
« ui/gfx/compositor/layer.cc ('K') | « ui/gfx/compositor/test_suite.h ('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) 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_suite.h" 5 #include "ui/gfx/compositor/test_suite.h"
6 6
7 #include "base/message_loop.h"
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
7 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
8 #include "ui/base/ui_base_paths.h" 10 #include "ui/base/ui_base_paths.h"
9 #include "ui/gfx/gfx_paths.h" 11 #include "ui/gfx/gfx_paths.h"
10 #include "ui/gfx/gl/gl_implementation.h" 12 #include "ui/gfx/gl/gl_implementation.h"
13 #include "webkit/glue/webkitplatformsupport_impl.h"
14
15 #if defined(USE_WEBKIT_COMPOSITOR)
16 #include "ui/gfx/compositor/compositor_cc.h"
17 #endif
11 18
12 CompositorTestSuite::CompositorTestSuite(int argc, char** argv) 19 CompositorTestSuite::CompositorTestSuite(int argc, char** argv)
13 : TestSuite(argc, argv) {} 20 : TestSuite(argc, argv) {}
14 21
22 CompositorTestSuite::~CompositorTestSuite() {}
23
15 void CompositorTestSuite::Initialize() { 24 void CompositorTestSuite::Initialize() {
16 #if defined(OS_LINUX) 25 #if defined(OS_LINUX)
17 gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL); 26 gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL);
18 #endif 27 #endif
19 base::TestSuite::Initialize(); 28 base::TestSuite::Initialize();
20 29
21 gfx::RegisterPathProvider(); 30 gfx::RegisterPathProvider();
22 ui::RegisterPathProvider(); 31 ui::RegisterPathProvider();
23 32
24 // Force unittests to run using en-US so if we test against string 33 // Force unittests to run using en-US so if we test against string
25 // output, it'll pass regardless of the system language. 34 // output, it'll pass regardless of the system language.
26 ui::ResourceBundle::InitSharedInstance("en-US"); 35 ui::ResourceBundle::InitSharedInstance("en-US");
36
37 message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI));
38 webkit_support_.reset(new webkit_glue::WebKitPlatformSupportImpl);
39 WebKit::initialize(webkit_support_.get());
27 } 40 }
28 41
29 void CompositorTestSuite::Shutdown() { 42 void CompositorTestSuite::Shutdown() {
43 WebKit::shutdown();
44 webkit_support_.reset();
45 message_loop_.reset();
46
30 ui::ResourceBundle::CleanupSharedInstance(); 47 ui::ResourceBundle::CleanupSharedInstance();
31 48
32 base::TestSuite::Shutdown(); 49 base::TestSuite::Shutdown();
33 } 50 }
OLDNEW
« ui/gfx/compositor/layer.cc ('K') | « ui/gfx/compositor/test_suite.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698