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

Unified Diff: gpu/command_buffer/common/unittest_main.cc

Issue 1867873002: Move unittests in content/common/gpu/client to gpu/ipc/client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 8 months 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
« no previous file with comments | « gpu/BUILD.gn ('k') | gpu/gpu.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/unittest_main.cc
diff --git a/gpu/command_buffer/common/unittest_main.cc b/gpu/command_buffer/common/unittest_main.cc
index ed03dca8b6f2fee0183e3c7d29fb69f33875a7ca..6e907d5053392a4f94333a237bfc8626eb2d6fc0 100644
--- a/gpu/command_buffer/common/unittest_main.cc
+++ b/gpu/command_buffer/common/unittest_main.cc
@@ -3,11 +3,48 @@
// found in the LICENSE file.
#include "base/bind.h"
+#include "base/command_line.h"
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
+#include "build/build_config.h"
+
+#if defined(OS_ANDROID)
+#include "gpu/ipc/client/android/in_process_surface_texture_manager.h"
+#endif
+
+namespace {
+
+class GpuTestSuite : public base::TestSuite {
+ public:
+ GpuTestSuite(int argc, char** argv);
+ ~GpuTestSuite() override;
+
+ protected:
+ void Initialize() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GpuTestSuite);
+};
+
+GpuTestSuite::GpuTestSuite(int argc, char** argv)
+ : base::TestSuite(argc, argv) {}
+
+GpuTestSuite::~GpuTestSuite() {}
+
+void GpuTestSuite::Initialize() {
+ base::TestSuite::Initialize();
+#if defined(OS_ANDROID)
+ gpu::SurfaceTextureManager::SetInstance(
+ gpu::InProcessSurfaceTextureManager::GetInstance());
+#endif
+}
+
+} // namespace
int main(int argc, char** argv) {
- base::TestSuite test_suite(argc, argv);
+ base::CommandLine::Init(argc, argv);
+ GpuTestSuite test_suite(argc, argv);
+
return base::LaunchUnitTests(
argc, argv,
base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
« no previous file with comments | « gpu/BUILD.gn ('k') | gpu/gpu.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698