Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ui/gfx/test/gfx_test_utils.h" | |
| 6 | |
| 7 #include "base/command_line.h" | |
| 8 #include "testing/gtest/include/gtest/gtest.h" | |
| 9 #include "ui/gfx/gl/gl_switches.h" | |
| 10 | |
| 11 #if defined(VIEWS_COMPOSITOR) | |
| 12 #include "ui/gfx/compositor/compositor.h" | |
| 13 #include "ui/gfx/compositor/test_compositor.h" | |
| 14 #endif | |
| 15 | |
| 16 namespace ui { | |
| 17 namespace gfx_test_utils { | |
| 18 | |
| 19 void SetupTestCompositor() { | |
| 20 #if defined(OS_LINUX) | |
| 21 // Test bots don't have DesktopGL/EGL. | |
| 22 EXPECT_TRUE(!CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL)); | |
|
Paweł Hajdan Jr.
2011/10/19 08:49:37
Please convert it so that the function returns boo
danakj
2011/10/19 13:55:48
So if you have GL set to something already the tes
| |
| 23 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | |
| 24 switches::kUseGL, gfx::kGLImplementationOSMesaName); | |
| 25 #endif | |
| 26 | |
| 27 #if defined(VIEWS_COMPOSITOR) | |
| 28 // Use a mock compositor that noops draws. | |
| 29 ui::Compositor::set_compositor_factory_for_testing( | |
| 30 ui::TestCompositor::Create); | |
| 31 #endif | |
| 32 } | |
| 33 | |
| 34 } // namespace gfx_test_utils | |
| 35 } // namespace ui | |
| OLD | NEW |