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

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

Issue 23498059: Remove last dependencies on ui/base from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: last rebase Created 7 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
« no previous file with comments | « ui/base/win/foreground_helper.h ('k') | ui/gfx/DEPS » ('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) 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 "ui/compositor/test/test_suite.h" 5 #include "ui/compositor/test/test_suite.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "ui/compositor/compositor.h" 9 #include "ui/compositor/compositor.h"
10 #include "ui/compositor/compositor_switches.h" 10 #include "ui/compositor/compositor_switches.h"
11 #include "ui/gfx/gfx_paths.h" 11 #include "ui/gfx/gfx_paths.h"
12 #include "ui/gl/gl_implementation.h" 12 #include "ui/gl/gl_implementation.h"
13 13
14 #if defined(USE_X11) 14 #if defined(USE_X11)
15 #include <X11/Xlib.h> 15 #include <X11/Xlib.h>
16 #endif 16 #endif
17 17
18 #if defined(OS_WIN)
19 #include "ui/gfx/win/dpi.h"
20 #endif
21
18 namespace ui { 22 namespace ui {
19 namespace test { 23 namespace test {
20 24
21 CompositorTestSuite::CompositorTestSuite(int argc, char** argv) 25 CompositorTestSuite::CompositorTestSuite(int argc, char** argv)
22 : TestSuite(argc, argv) {} 26 : TestSuite(argc, argv) {}
23 27
24 CompositorTestSuite::~CompositorTestSuite() {} 28 CompositorTestSuite::~CompositorTestSuite() {}
25 29
26 void CompositorTestSuite::Initialize() { 30 void CompositorTestSuite::Initialize() {
27 #if defined(USE_X11) 31 #if defined(USE_X11)
28 XInitThreads(); 32 XInitThreads();
29 #endif 33 #endif
30 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL)); 34 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL));
31 base::TestSuite::Initialize(); 35 base::TestSuite::Initialize();
32 36
33 gfx::RegisterPathProvider(); 37 gfx::RegisterPathProvider();
34 38
39 #if defined(OS_WIN)
40 gfx::InitDeviceScaleFactor(1.0f);
41 #endif
42
35 message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); 43 message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI));
36 } 44 }
37 45
38 void CompositorTestSuite::Shutdown() { 46 void CompositorTestSuite::Shutdown() {
39 message_loop_.reset(); 47 message_loop_.reset();
40 48
41 base::TestSuite::Shutdown(); 49 base::TestSuite::Shutdown();
42 } 50 }
43 51
44 } // namespace test 52 } // namespace test
45 } // namespace ui 53 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/win/foreground_helper.h ('k') | ui/gfx/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698