OLD | NEW |
| (Empty) |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 import("//mojo/public/mojo_application.gni") | |
6 import("//mojo/public/mojo_application_manifest.gni") | |
7 import("//mojo/public/tools/bindings/mojom.gni") | |
8 import("//testing/test.gni") | |
9 | |
10 source_set("lifecycle") { | |
11 testonly = true | |
12 sources = [ | |
13 "lifecycle_unittest.cc", | |
14 ] | |
15 deps = [ | |
16 ":interfaces", | |
17 "//base", | |
18 "//base/test:test_support", | |
19 "//mojo/shell/public/cpp:shell_test_support", | |
20 "//mojo/shell/public/cpp:sources", | |
21 "//mojo/shell/public/interfaces", | |
22 "//mojo/shell/runner/common", | |
23 "//mojo/shell/tests:util", | |
24 ] | |
25 | |
26 data_deps = [ | |
27 ":lifecycle_unittest_app", | |
28 ":lifecycle_unittest_parent", | |
29 ":lifecycle_unittest_exe", | |
30 ":lifecycle_unittest_package", | |
31 ":manifest", | |
32 ] | |
33 } | |
34 | |
35 mojom("interfaces") { | |
36 sources = [ | |
37 "lifecycle_unittest.mojom", | |
38 ] | |
39 } | |
40 | |
41 mojo_application_manifest("manifest") { | |
42 application_name = "lifecycle_unittest" | |
43 source = "lifecycle_unittest_manifest.json" | |
44 } | |
45 | |
46 mojo_application_manifest("lifecycle_unittest_package_app_a_manifest") { | |
47 application_name = "lifecycle_unittest_package_app_a" | |
48 source = "package_app_a_manifest.json" | |
49 } | |
50 | |
51 mojo_application_manifest("lifecycle_unittest_package_app_b_manifest") { | |
52 application_name = "lifecycle_unittest_package_app_b" | |
53 source = "package_app_b_manifest.json" | |
54 } | |
55 | |
56 source_set("app_client") { | |
57 sources = [ | |
58 "app_client.cc", | |
59 "app_client.h", | |
60 ] | |
61 deps = [ | |
62 ":interfaces", | |
63 "//base", | |
64 "//mojo/shell/public/cpp:sources", | |
65 "//mojo/shell/public/interfaces", | |
66 ] | |
67 } | |
68 | |
69 mojo_native_application("lifecycle_unittest_package") { | |
70 testonly = true | |
71 sources = [ | |
72 "package.cc", | |
73 ] | |
74 deps = [ | |
75 ":app_client", | |
76 ":interfaces", | |
77 ":lifecycle_unittest_package_manifest", | |
78 "//base", | |
79 "//mojo/shell/public/cpp:sources", | |
80 "//mojo/shell/public/interfaces", | |
81 ] | |
82 } | |
83 | |
84 mojo_application_manifest("lifecycle_unittest_package_manifest") { | |
85 application_name = "lifecycle_unittest_package" | |
86 source = "package_manifest.json" | |
87 deps = [ | |
88 ":lifecycle_unittest_package_app_a_manifest", | |
89 ":lifecycle_unittest_package_app_b_manifest", | |
90 ] | |
91 packaged_applications = [ | |
92 "lifecycle_unittest_package_app_a", | |
93 "lifecycle_unittest_package_app_b", | |
94 ] | |
95 } | |
96 | |
97 mojo_native_application("lifecycle_unittest_app") { | |
98 testonly = true | |
99 sources = [ | |
100 "app.cc", | |
101 ] | |
102 deps = [ | |
103 ":app_client", | |
104 ":interfaces", | |
105 "//base", | |
106 "//mojo/shell/public/cpp:sources", | |
107 ] | |
108 | |
109 data_deps = [ | |
110 ":lifecycle_unittest_app_manifest", | |
111 ] | |
112 } | |
113 | |
114 mojo_application_manifest("lifecycle_unittest_app_manifest") { | |
115 application_name = "lifecycle_unittest_app" | |
116 source = "app_manifest.json" | |
117 } | |
118 | |
119 mojo_native_application("lifecycle_unittest_parent") { | |
120 testonly = true | |
121 sources = [ | |
122 "parent.cc", | |
123 ] | |
124 deps = [ | |
125 ":interfaces", | |
126 "//base", | |
127 "//mojo/shell/public/cpp:sources", | |
128 ] | |
129 | |
130 data_deps = [ | |
131 ":lifecycle_unittest_parent_manifest", | |
132 ] | |
133 } | |
134 | |
135 mojo_application_manifest("lifecycle_unittest_parent_manifest") { | |
136 application_name = "lifecycle_unittest_parent" | |
137 source = "parent_manifest.json" | |
138 } | |
139 | |
140 executable("lifecycle_unittest_exe") { | |
141 testonly = true | |
142 sources = [ | |
143 "lifecycle_exe.cc", | |
144 ] | |
145 deps = [ | |
146 ":app_client", | |
147 "//base", | |
148 "//mojo/shell/public/cpp:sources", | |
149 "//mojo/shell/runner/child:test_native_main", | |
150 ] | |
151 | |
152 data_deps = [ | |
153 ":lifecycle_unittest_exe_manifest", | |
154 ] | |
155 } | |
156 | |
157 mojo_application_manifest("lifecycle_unittest_exe_manifest") { | |
158 type = "exe" | |
159 application_name = "lifecycle_unittest_exe" | |
160 source = "exe_manifest.json" | |
161 } | |
OLD | NEW |