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

Side by Side 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, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_FILES_C_LIB_TEMPLATE_UTIL_H_ 5 #ifndef SERVICES_NATIVE_SUPPORT_PROCESS_TEST_BASE_H_
6 #define SERVICES_FILES_C_LIB_TEMPLATE_UTIL_H_ 6 #define SERVICES_NATIVE_SUPPORT_PROCESS_TEST_BASE_H_
7 7
8 namespace mojio { 8 #include "base/macros.h"
9 #include "mojo/public/cpp/application/application_test_base.h"
10 #include "mojo/services/native_support/public/interfaces/process.mojom.h"
11
12 namespace native_support {
9 13
10 // TODO(vtl): Stuff copied from mojo/public/cpp/bindings/lib/template_util.h. 14 // TODO(vtl): Stuff copied from mojo/public/cpp/bindings/lib/template_util.h.
11 template <class T, T v> 15 template <class T, T v>
12 struct IntegralConstant { 16 struct IntegralConstant {
13 static const T value = v; 17 static const T value = v;
14 }; 18 };
15 19
16 template <class T, T v> 20 template <class T, T v>
17 const T IntegralConstant<T, v>::value; 21 const T IntegralConstant<T, v>::value;
18 22
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 71 }
68 72
69 template <typename T1, typename T2> 73 template <typename T1, typename T2>
70 mojo::Callback<void(T1, T2)> Capture(T1* t1, T2* t2) { 74 mojo::Callback<void(T1, T2)> Capture(T1* t1, T2* t2) {
71 return [t1, t2](T1 got_t1, T2 got_t2) { 75 return [t1, t2](T1 got_t1, T2 got_t2) {
72 *t1 = Forward(got_t1); 76 *t1 = Forward(got_t1);
73 *t2 = Forward(got_t2); 77 *t2 = Forward(got_t2);
74 }; 78 };
75 } 79 }
76 80
77 } // namespace mojio 81 class ProcessTestBase : public mojo::test::ApplicationTestBase {
82 public:
83 ProcessTestBase();
84 ~ProcessTestBase() override;
78 85
79 #endif // SERVICES_FILES_C_LIB_TEMPLATE_UTIL_H_ 86 void SetUp() override;
87
88 protected:
89 ProcessPtr& process() { return process_; }
90
91 private:
92 ProcessPtr process_;
93
94 DISALLOW_COPY_AND_ASSIGN(ProcessTestBase);
95 };
96
97 } // namespace native_support
98
99 #endif // SERVICES_NATIVE_SUPPORT_PROCESS_TEST_BASE_H_
OLDNEW
« 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