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

Unified Diff: chrome/test/gpu/gpu_uitest.cc

Issue 4784001: Removed --use-gl=osmesa as default for ui and browser tests.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/gpu/gpu_uitest.cc
===================================================================
--- chrome/test/gpu/gpu_uitest.cc (revision 65835)
+++ chrome/test/gpu/gpu_uitest.cc (working copy)
@@ -4,7 +4,10 @@
#include <string>
+#include "app/gfx/gl/gl_implementation.h"
#include "build/build_config.h"
+#include "chrome/common/chrome_switches.h"
+#include "chrome/test/test_launcher_utils.h"
#include "chrome/test/ui/ui_test.h"
#include "net/base/net_util.h"
@@ -14,17 +17,26 @@
}
virtual void SetUp() {
+ EXPECT_TRUE(test_launcher_utils::OverrideGLImplementation(
+ &launch_arguments_,
+ gfx::kGLImplementationOSMesaName));
+
+#if defined(OS_MACOSX)
+ // Accelerated compositing does not work with OSMesa. AcceleratedSurface
+ // assumes GL contexts are native.
+ launch_arguments_.AppendSwitch(switches::kDisableAcceleratedCompositing);
+#endif
+
UITest::SetUp();
+
gpu_test_dir_ = test_data_directory_.AppendASCII("gpu");
}
FilePath gpu_test_dir_;
};
-TEST_F(GPUUITest, UITestLaunchedWithOSMesa) {
+TEST_F(GPUUITest, UITestCanLaunchWithOSMesa) {
// Check the webgl test reports success and that the renderer was OSMesa.
- // We use OSMesa for tests in order to get consistent results across a
- // variety of boxes.
NavigateToURL(
net::FilePathToFileURL(gpu_test_dir_.AppendASCII("webgl.html")));

Powered by Google App Engine
This is Rietveld 408576698