Index: trunk/src/chrome/test/ppapi/ppapi_test.cc |
=================================================================== |
--- trunk/src/chrome/test/ppapi/ppapi_test.cc (revision 216906) |
+++ trunk/src/chrome/test/ppapi/ppapi_test.cc (working copy) |
@@ -22,6 +22,7 @@ |
#include "chrome/browser/ui/tabs/tab_strip_model.h" |
#include "chrome/common/chrome_paths.h" |
#include "chrome/common/chrome_switches.h" |
+#include "chrome/test/base/test_launcher_utils.h" |
#include "chrome/test/base/ui_test_utils.h" |
#include "content/public/browser/dom_operation_notification_details.h" |
#include "content/public/browser/notification_service.h" |
@@ -115,6 +116,15 @@ |
} |
void PPAPITestBase::SetUpCommandLine(CommandLine* command_line) { |
+ // Do not use mesa if real GPU is required. |
+ if (!command_line->HasSwitch(switches::kUseGpuInTests)) { |
+#if !defined(OS_MACOSX) |
+ CHECK(test_launcher_utils::OverrideGLImplementation( |
+ command_line, gfx::kGLImplementationOSMesaName)) << |
+ "kUseGL must not be set by test framework code!"; |
+#endif |
+ } |
+ |
// The test sends us the result via a cookie. |
command_line->AppendSwitch(switches::kEnableFileCookies); |