Chromium Code Reviews| Index: chrome/test/base/in_process_browser_test.cc |
| diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc |
| index b351355fafbc7dc76dcb3304f373f1195fff8bcb..822e959e6c6778dc5d07926e9fdbe8f8e166b345 100644 |
| --- a/chrome/test/base/in_process_browser_test.cc |
| +++ b/chrome/test/base/in_process_browser_test.cc |
| @@ -36,6 +36,12 @@ |
| #include "content/renderer/mock_content_renderer_client.h" |
| #include "net/base/mock_host_resolver.h" |
| #include "net/test/test_server.h" |
| +#include "ui/gfx/gl/gl_switches.h" |
| + |
| +#if defined(VIEWS_COMPOSITOR) |
| +#include "ui/gfx/compositor/test_compositor.h" |
| +#include "views/widget/widget.h" |
| +#endif |
| #if defined(OS_CHROMEOS) |
| #include "chrome/browser/chromeos/audio_handler.h" |
| @@ -44,6 +50,12 @@ |
| // Passed as value of kTestType. |
| static const char kBrowserTestType[] = "browser"; |
| +#if defined(VIEWS_COMPOSITOR) |
| +static ui::Compositor* TestCreateCompositor(ui::CompositorDelegate* owner) { |
| + return new ui::TestCompositor(owner); |
| +} |
| +#endif |
| + |
| InProcessBrowserTest::InProcessBrowserTest() |
| : browser_(NULL), |
| show_window_(false), |
| @@ -128,6 +140,17 @@ void InProcessBrowserTest::PrepareTestCommandLine(CommandLine* command_line) { |
| // Propagate commandline settings from test_launcher_utils. |
| test_launcher_utils::PrepareBrowserCommandLineForTests(command_line); |
| + // Use MesaGL as the GL implementation, as desktopgl/egl is not present on |
| + // test bots yet. |
| + EXPECT_TRUE( |
| + test_launcher_utils::OverrideGLImplementation( |
|
Paweł Hajdan Jr.
2011/10/13 20:08:13
Do you also want things to apply to content? If so
danakj
2011/10/14 15:15:13
Yes I should, thanks !
|
| + command_line, gfx::kGLImplementationOSMesaName)); |
| + |
| +#if defined(VIEWS_COMPOSITOR) |
| + // Use a mock compositor that noops draws. |
| + views::Widget::set_compositor_factory_for_testing(&TestCreateCompositor); |
| +#endif |
| + |
| if (dom_automation_enabled_) |
| command_line->AppendSwitch(switches::kDomAutomationController); |