summaryrefslogtreecommitdiff
path: root/chromium/ppapi/tests/extensions/BUILD.gn
blob: 2a6342f1007c515f649492320d6bb2481c692590 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//components/nacl/features.gni")
import("//ppapi/native_client/nacl_test_data.gni")

group("extensions") {
  newlib = "//build/toolchain/nacl:clang_newlib_${target_cpu}"
  pnacl = "//build/toolchain/nacl:newlib_pnacl"
  data_deps = [
    ":ppapi_tests_extensions_background_keepalive($newlib)",
    ":ppapi_tests_extensions_load_unload($newlib)",
    ":ppapi_tests_extensions_media_galleries($newlib)",
    ":ppapi_tests_extensions_multicast_permissions($newlib)",
    ":ppapi_tests_extensions_no_socket_permissions($newlib)",
    ":ppapi_tests_extensions_packaged_app($newlib)",
    ":ppapi_tests_extensions_packaged_app($pnacl)",
    ":ppapi_tests_extensions_popup($newlib)",
    ":ppapi_tests_extensions_socket_permissions($newlib)",
  ]
  if ((target_cpu == "x86" || target_cpu == "x64") && is_linux &&
      enable_nacl_nonsfi) {
    nonsfi = "//build/toolchain/nacl:newlib_pnacl_nonsfi"
    data_deps += [ ":ppapi_tests_extensions_packaged_app($nonsfi)" ]
  }
}

if (is_nacl && !is_nacl_nonsfi) {
  nacl_test_data("ppapi_tests_extensions_background_keepalive") {
    sources = [ "background_keepalive/background.cc" ]
    deps = [ "//ppapi/cpp" ]
    destination_dir = "test_data/ppapi/tests/extensions/background_keepalive"
    test_files = [
      "background_keepalive/background.js",
      "background_keepalive/manifest.json",
    ]
  }

  nacl_test_data("ppapi_tests_extensions_load_unload") {
    sources = [ "load_unload/load_unload.cc" ]
    deps = [ "//ppapi/cpp" ]
    destination_dir = "test_data/ppapi/tests/extensions/load_unload"
    test_files = [
      "load_unload/background.js",
      "load_unload/ext_icon.png",
      "load_unload/manifest.json",
    ]
  }

  nacl_test_data("ppapi_tests_extensions_media_galleries") {
    sources = [
      "//ppapi/tests/test_utils.cc",
      "//ppapi/tests/test_utils.h",
      "media_galleries/test_galleries.cc",
    ]
    deps = [ "//ppapi/cpp" ]
    destination_dir = "test_data/ppapi/tests/extensions/media_galleries"
    test_files = [
      "media_galleries/background.js",
      "media_galleries/index.html",
      "media_galleries/manifest.json",
      "media_galleries/test.js",
    ]
  }

  nacl_test_data("ppapi_tests_extensions_multicast_permissions") {
    sources = [ "multicast_permissions/test_multicast_permissions.cc" ]
    deps = [ "//ppapi/cpp" ]
    destination_dir = "test_data/ppapi/tests/extensions/multicast_permissions"
    test_files = [
      "multicast_permissions/controller.js",
      "multicast_permissions/index.html",
      "multicast_permissions/main.js",
      "multicast_permissions/manifest.json",
    ]
  }

  nacl_test_data("ppapi_tests_extensions_no_socket_permissions") {
    sources = [ "no_socket_permissions/test_no_socket_permissions.cc" ]
    deps = [ "//ppapi/cpp" ]
    destination_dir = "test_data/ppapi/tests/extensions/no_socket_permissions"
    test_files = [
      "no_socket_permissions/controller.js",
      "no_socket_permissions/index.html",
      "no_socket_permissions/main.js",
      "no_socket_permissions/manifest.json",
    ]
  }

  nacl_test_data("ppapi_tests_extensions_popup") {
    sources = [ "popup/module.cc" ]
    deps = [ "//ppapi/cpp" ]
    destination_dir = "test_data/ppapi/tests/extensions/popup"
    test_files = [
      "popup/background.js",
      "popup/popup.html",
      "popup/popup.js",
      "popup/manifest.json",
    ]
  }

  nacl_test_data("ppapi_tests_extensions_socket_permissions") {
    sources = [ "socket_permissions/test_socket_permissions.cc" ]
    deps = [ "//ppapi/cpp" ]
    destination_dir = "test_data/ppapi/tests/extensions/socket_permissions"
    test_files = [
      "socket_permissions/controller.js",
      "socket_permissions/index.html",
      "socket_permissions/main.js",
      "socket_permissions/manifest.json",
    ]
  }
}

if (is_nacl) {
  nacl_test_data("ppapi_tests_extensions_packaged_app") {
    sources = [ "packaged_app/test_packaged_app.cc" ]
    deps = [
      "//ipc:message_support",
      "//ppapi/cpp",
    ]
    destination_dir = "test_data/ppapi/tests/extensions/packaged_app"
    test_files = [
      "packaged_app/controller.js",
      "packaged_app/index.html",
      "packaged_app/main.js",
      "packaged_app/manifest.json",
      "packaged_app/test_file.txt",
      "packaged_app/test_file2.txt",
    ]
    nmfflags = [
      # Add 129 "files" entries to make sure that open_resource can handle
      # more files than IPC::MessageAttachmentSet::kMaxDescriptorsPerMessage
      # which is currently 128.
      "-xtest_file0:test_file.txt",
      "-xtest_file1:test_file2.txt",
      "-xtest_file2:test_file.txt",
      "-xtest_file3:test_file2.txt",
      "-xtest_file4:test_file.txt",
      "-xtest_file5:test_file2.txt",
      "-xtest_file6:test_file.txt",
      "-xtest_file7:test_file2.txt",
      "-xtest_file8:test_file.txt",
      "-xtest_file9:test_file2.txt",
      "-xtest_file10:test_file.txt",
      "-xtest_file11:test_file2.txt",
      "-xtest_file12:test_file.txt",
      "-xtest_file13:test_file2.txt",
      "-xtest_file14:test_file.txt",
      "-xtest_file15:test_file2.txt",
      "-xtest_file16:test_file.txt",
      "-xtest_file17:test_file2.txt",
      "-xtest_file18:test_file.txt",
      "-xtest_file19:test_file2.txt",
      "-xtest_file20:test_file.txt",
      "-xtest_file21:test_file2.txt",
      "-xtest_file22:test_file.txt",
      "-xtest_file23:test_file2.txt",
      "-xtest_file24:test_file.txt",
      "-xtest_file25:test_file2.txt",
      "-xtest_file26:test_file.txt",
      "-xtest_file27:test_file2.txt",
      "-xtest_file28:test_file.txt",
      "-xtest_file29:test_file2.txt",
      "-xtest_file30:test_file.txt",
      "-xtest_file31:test_file2.txt",
      "-xtest_file32:test_file.txt",
      "-xtest_file33:test_file2.txt",
      "-xtest_file34:test_file.txt",
      "-xtest_file35:test_file2.txt",
      "-xtest_file36:test_file.txt",
      "-xtest_file37:test_file2.txt",
      "-xtest_file38:test_file.txt",
      "-xtest_file39:test_file2.txt",
      "-xtest_file40:test_file.txt",
      "-xtest_file41:test_file2.txt",
      "-xtest_file42:test_file.txt",
      "-xtest_file43:test_file2.txt",
      "-xtest_file44:test_file.txt",
      "-xtest_file45:test_file2.txt",
      "-xtest_file46:test_file.txt",
      "-xtest_file47:test_file2.txt",
      "-xtest_file48:test_file.txt",
      "-xtest_file49:test_file2.txt",
      "-xtest_file50:test_file.txt",
      "-xtest_file51:test_file2.txt",
      "-xtest_file52:test_file.txt",
      "-xtest_file53:test_file2.txt",
      "-xtest_file54:test_file.txt",
      "-xtest_file55:test_file2.txt",
      "-xtest_file56:test_file.txt",
      "-xtest_file57:test_file2.txt",
      "-xtest_file58:test_file.txt",
      "-xtest_file59:test_file2.txt",
      "-xtest_file60:test_file.txt",
      "-xtest_file61:test_file2.txt",
      "-xtest_file62:test_file.txt",
      "-xtest_file63:test_file2.txt",
      "-xtest_file64:test_file.txt",
      "-xtest_file65:test_file2.txt",
      "-xtest_file66:test_file.txt",
      "-xtest_file67:test_file2.txt",
      "-xtest_file68:test_file.txt",
      "-xtest_file69:test_file2.txt",
      "-xtest_file70:test_file.txt",
      "-xtest_file71:test_file2.txt",
      "-xtest_file72:test_file.txt",
      "-xtest_file73:test_file2.txt",
      "-xtest_file74:test_file.txt",
      "-xtest_file75:test_file2.txt",
      "-xtest_file76:test_file.txt",
      "-xtest_file77:test_file2.txt",
      "-xtest_file78:test_file.txt",
      "-xtest_file79:test_file2.txt",
      "-xtest_file80:test_file.txt",
      "-xtest_file81:test_file2.txt",
      "-xtest_file82:test_file.txt",
      "-xtest_file83:test_file2.txt",
      "-xtest_file84:test_file.txt",
      "-xtest_file85:test_file2.txt",
      "-xtest_file86:test_file.txt",
      "-xtest_file87:test_file2.txt",
      "-xtest_file88:test_file.txt",
      "-xtest_file89:test_file2.txt",
      "-xtest_file90:test_file.txt",
      "-xtest_file91:test_file2.txt",
      "-xtest_file92:test_file.txt",
      "-xtest_file93:test_file2.txt",
      "-xtest_file94:test_file.txt",
      "-xtest_file95:test_file2.txt",
      "-xtest_file96:test_file.txt",
      "-xtest_file97:test_file2.txt",
      "-xtest_file98:test_file.txt",
      "-xtest_file99:test_file2.txt",
      "-xtest_file100:test_file.txt",
      "-xtest_file101:test_file2.txt",
      "-xtest_file102:test_file.txt",
      "-xtest_file103:test_file2.txt",
      "-xtest_file104:test_file.txt",
      "-xtest_file105:test_file2.txt",
      "-xtest_file106:test_file.txt",
      "-xtest_file107:test_file2.txt",
      "-xtest_file108:test_file.txt",
      "-xtest_file109:test_file2.txt",
      "-xtest_file110:test_file.txt",
      "-xtest_file111:test_file2.txt",
      "-xtest_file112:test_file.txt",
      "-xtest_file113:test_file2.txt",
      "-xtest_file114:test_file.txt",
      "-xtest_file115:test_file2.txt",
      "-xtest_file116:test_file.txt",
      "-xtest_file117:test_file2.txt",
      "-xtest_file118:test_file.txt",
      "-xtest_file119:test_file2.txt",
      "-xtest_file120:test_file.txt",
      "-xtest_file121:test_file2.txt",
      "-xtest_file122:test_file.txt",
      "-xtest_file123:test_file2.txt",
      "-xtest_file124:test_file.txt",
      "-xtest_file125:test_file2.txt",
      "-xtest_file126:test_file.txt",
      "-xtest_file127:test_file2.txt",
      "-xtest_file128:test_file.txt",
    ]
  }
}