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

Unified Diff: services/native_support/process_test_base.h

Issue 1321253010: Add a "native_support" service. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fix android? Created 5 years, 3 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 | « services/native_support/process_io_redirection.cc ('k') | services/native_support/process_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/native_support/process_test_base.h
diff --git a/mojo/services/files/public/c/lib/template_util.h b/services/native_support/process_test_base.h
similarity index 71%
copy from mojo/services/files/public/c/lib/template_util.h
copy to services/native_support/process_test_base.h
index d5fcb2bfb15d05197ea8e537887292d66c580516..0d4cc2abc6d4c204c2a042b0deba5b8669773416 100644
--- a/mojo/services/files/public/c/lib/template_util.h
+++ b/services/native_support/process_test_base.h
@@ -2,10 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SERVICES_FILES_C_LIB_TEMPLATE_UTIL_H_
-#define SERVICES_FILES_C_LIB_TEMPLATE_UTIL_H_
+#ifndef SERVICES_NATIVE_SUPPORT_PROCESS_TEST_BASE_H_
+#define SERVICES_NATIVE_SUPPORT_PROCESS_TEST_BASE_H_
-namespace mojio {
+#include "base/macros.h"
+#include "mojo/public/cpp/application/application_test_base.h"
+#include "mojo/services/native_support/public/interfaces/process.mojom.h"
+
+namespace native_support {
// TODO(vtl): Stuff copied from mojo/public/cpp/bindings/lib/template_util.h.
template <class T, T v>
@@ -74,6 +78,22 @@ mojo::Callback<void(T1, T2)> Capture(T1* t1, T2* t2) {
};
}
-} // namespace mojio
+class ProcessTestBase : public mojo::test::ApplicationTestBase {
+ public:
+ ProcessTestBase();
+ ~ProcessTestBase() override;
+
+ void SetUp() override;
+
+ protected:
+ ProcessPtr& process() { return process_; }
+
+ private:
+ ProcessPtr process_;
+
+ DISALLOW_COPY_AND_ASSIGN(ProcessTestBase);
+};
+
+} // namespace native_support
-#endif // SERVICES_FILES_C_LIB_TEMPLATE_UTIL_H_
+#endif // SERVICES_NATIVE_SUPPORT_PROCESS_TEST_BASE_H_
« no previous file with comments | « services/native_support/process_io_redirection.cc ('k') | services/native_support/process_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698