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

Unified Diff: ui/ozone/public/ozone_gpu_test_helper.h

Issue 1208603002: content: implement unittests backend for Ozone GBM Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: force single process Created 5 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: ui/ozone/public/ozone_gpu_test_helper.h
diff --git a/ui/ozone/public/ozone_gpu_test_helper.h b/ui/ozone/public/ozone_gpu_test_helper.h
index e3428656ad5a680a93a9af67e98890e5298cced6..f4127cb27a2f3d7a4c2b6357d62489e54ef7c178 100644
--- a/ui/ozone/public/ozone_gpu_test_helper.h
+++ b/ui/ozone/public/ozone_gpu_test_helper.h
@@ -5,8 +5,10 @@
#ifndef UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_
#define UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/message_loop/message_loop.h"
#include "ui/ozone/ozone_export.h"
namespace base {
@@ -43,6 +45,22 @@ class OZONE_EXPORT OzoneGpuTestHelper {
DISALLOW_COPY_AND_ASSIGN(OzoneGpuTestHelper);
};
+// Helper class for tests to initialize both UI and GPU Ozone platform.
+class OZONE_EXPORT OzoneInitializerForTest {
+ public:
+ static scoped_ptr<OzoneInitializerForTest> Create();
+ ~OzoneInitializerForTest();
+
+ private:
+ OzoneInitializerForTest();
+ bool Initialize();
+
+ scoped_ptr<OzoneGpuTestHelper> gpu_helper_;
+ scoped_ptr<base::MessageLoop> message_loop_;
+
+ DISALLOW_COPY_AND_ASSIGN(OzoneInitializerForTest);
+};
+
} // namespace ui
#endif // UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698