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

Side by Side Diff: ui/gfx/test/gfx_test_utils.cc

Issue 8533019: Add two pixel-based compositor unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing images from this CL Created 9 years, 1 month 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/gfx/compositor/test_utils.cc ('k') | views/run_all_unittests.cc » ('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/gfx/test/gfx_test_utils.h" 5 #include "ui/gfx/test/gfx_test_utils.h"
6 6
7 #if defined(VIEWS_COMPOSITOR) 7 #if defined(VIEWS_COMPOSITOR)
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "ui/gfx/compositor/compositor.h" 9 #include "ui/gfx/compositor/compositor.h"
10 #include "ui/gfx/compositor/test_compositor.h" 10 #include "ui/gfx/compositor/test/test_compositor.h"
11 #endif 11 #endif
12 12
13 #if defined(VIEWS_COMPOSITOR) 13 #if defined(VIEWS_COMPOSITOR)
14 namespace switches { 14 namespace switches {
15 15
16 const char kDisableTestCompositor[] = "disable-test-compositor"; 16 const char kDisableTestCompositor[] = "disable-test-compositor";
17 17
18 } 18 }
19 #endif 19 #endif
20 20
21 namespace ui { 21 namespace ui {
22 namespace gfx_test_utils { 22 namespace gfx_test_utils {
23 23
24 void SetupTestCompositor() { 24 void SetupTestCompositor() {
25 #if defined(VIEWS_COMPOSITOR) 25 #if defined(VIEWS_COMPOSITOR)
26 if (!CommandLine::ForCurrentProcess()->HasSwitch( 26 if (!CommandLine::ForCurrentProcess()->HasSwitch(
27 switches::kDisableTestCompositor)) { 27 switches::kDisableTestCompositor)) {
28 // Use a mock compositor that noops draws. 28 // Use a mock compositor that noops draws.
29 ui::Compositor::set_compositor_factory_for_testing( 29 ui::Compositor::set_compositor_factory_for_testing(
30 ui::TestCompositor::Create); 30 ui::TestCompositor::Create);
31 } 31 }
32 #endif 32 #endif
33 } 33 }
34 34
35 } // namespace gfx_test_utils 35 } // namespace gfx_test_utils
36 } // namespace ui 36 } // namespace ui
OLDNEW
« no previous file with comments | « ui/gfx/compositor/test_utils.cc ('k') | views/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698