Update V8 to version 4.7.21.
[chromium-blink-merge.git] / ppapi / BUILD.gn
blob28b89ed9eec75ec08f6dd703a4445d02f6292d87
1 # Copyright 2014 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.
5 copy("copy_test_files") {
6   visibility = [ ":*" ]
7   sources = [
8     # Keep "test_case.html.mock-http-headers" with "test_case.html".
9     "tests/ppapi_nacl_tests_newlib.nmf",
10     "tests/test_case.html",
11     "tests/test_case.html.mock-http-headers",
12     "tests/test_page.css",
13     "tests/test_page.css.mock-http-headers",
14   ]
15   outputs = [
16     "$root_out_dir/{{source_file_part}}",
17   ]
20 copy("copy_test_files2") {
21   visibility = [ ":*" ]
22   sources = [
23     "tests/test_url_loader_data/hello.txt",
24   ]
25   outputs = [
26     "$root_out_dir/test_url_loader_data/{{source_file_part}}",
27   ]
30 import("//ppapi/ppapi_sources.gni")
31 import("//testing/test.gni")
33 shared_library("ppapi_tests") {
34   sources = ppapi_sources.test_common_source_files +
35             ppapi_sources.test_trusted_source_files
37   configs += [ "//build/config:precompiled_headers" ]
38   defines = [ "GL_GLEXT_PROTOTYPES" ]
39   include_dirs = [ "lib/gl/include" ]
41   deps = [
42     ":copy_test_files",
43     ":copy_test_files2",
44     "//build/config/sanitizers:deps",
45     "//ppapi/cpp",
46     "//ppapi/shared_impl",
47   ]
50 shared_library("power_saver_test_plugin") {
51   sources = [
52     "tests/power_saver_test_plugin.cc",
53     "tests/test_utils.cc",
54   ]
56   deps = [
57     "//build/config/sanitizers:deps",
58     "//ppapi/cpp",
59     "//ppapi/shared_impl",
60   ]
63 test("ppapi_unittests") {
64   sources = [
65     "host/resource_message_filter_unittest.cc",
66     "proxy/device_enumeration_resource_helper_unittest.cc",
67     "proxy/file_chooser_resource_unittest.cc",
68     "proxy/file_system_resource_unittest.cc",
69     "proxy/flash_resource_unittest.cc",
70     "proxy/interface_list_unittest.cc",
71     "proxy/mock_resource.cc",
72     "proxy/mock_resource.h",
73     "proxy/nacl_message_scanner_unittest.cc",
74     "proxy/pdf_resource_unittest.cc",
75     "proxy/plugin_dispatcher_unittest.cc",
76     "proxy/plugin_resource_tracker_unittest.cc",
77     "proxy/plugin_var_tracker_unittest.cc",
78     "proxy/ppb_var_unittest.cc",
79     "proxy/ppp_instance_private_proxy_unittest.cc",
80     "proxy/ppp_instance_proxy_unittest.cc",
81     "proxy/ppp_messaging_proxy_unittest.cc",
82     "proxy/printing_resource_unittest.cc",
83     "proxy/raw_var_data_unittest.cc",
84     "proxy/serialized_var_unittest.cc",
85     "proxy/tracked_callback_unittest.cc",
86     "proxy/video_decoder_resource_unittest.cc",
87     "proxy/video_encoder_resource_unittest.cc",
88     "proxy/websocket_resource_unittest.cc",
89     "shared_impl/media_stream_audio_track_shared_unittest.cc",
90     "shared_impl/media_stream_buffer_manager_unittest.cc",
91     "shared_impl/media_stream_video_track_shared_unittest.cc",
92     "shared_impl/proxy_lock_unittest.cc",
93     "shared_impl/resource_tracker_unittest.cc",
94     "shared_impl/thread_aware_callback_unittest.cc",
95     "shared_impl/time_conversion_unittest.cc",
96     "shared_impl/var_tracker_unittest.cc",
97   ]
99   deps = [
100     "//base/allocator",
101     "//base/test:run_all_unittests",
102     "//base/test:test_support",
103     "//gpu/ipc",
104     "//ipc",
105     "//ipc:test_support",
106     "//media:shared_memory_support",
107     "//ppapi/host",
108     "//ppapi/proxy",
109     "//ppapi/proxy:test_support",
110     "//ppapi/shared_impl",
111     "//ppapi/shared_impl:test_support",
112     "//testing/gmock",
113     "//testing/gtest",
114     "//ui/surface",
115   ]
118 test("ppapi_perftests") {
119   sources = [
120     "proxy/ppapi_perftests.cc",
121     "proxy/ppp_messaging_proxy_perftest.cc",
122   ]
124   deps = [
125     "//base/allocator",
126     "//base/test:test_support",
127     "//ppapi/proxy",
128     "//ppapi/proxy:test_support",
129     "//ppapi/shared_impl",
130     "//ppapi/shared_impl:test_support",
131     "//testing/gtest",
132   ]
135 executable("pepper_hash_for_uma") {
136   sources = [
137     "tools/pepper_hash_for_uma.cc",
138   ]
140   deps = [
141     "//base",
142     "//build/config/sanitizers:deps",
143   ]
146 source_set("ppapi_cpp_lib") {
147   sources = ppapi_sources.cpp_source_files
148   sources += [
149     "cpp/module_embedder.h",
150     "cpp/ppp_entrypoints.cc",
151   ]
154 source_set("ppapi_gles2_lib") {
155   include_dirs = [ "lib/gl/include" ]
156   sources = [
157     "lib/gl/gles2/gl2ext_ppapi.c",
158     "lib/gl/gles2/gl2ext_ppapi.h",
159     "lib/gl/gles2/gles2.c",
160   ]
161   deps = [
162     "//ppapi/cpp",
163   ]
166 if (is_nacl) {
167   executable("ppapi_nacl_tests_newlib") {
168     include_dirs = [
169       "lib/gl/include",
170       "..",
171     ]
173     sources = ppapi_sources.test_common_source_files +
174               ppapi_sources.test_nacl_source_files
176     defines = [ "GL_GLEXT_PROTOTYPES" ]
178     deps = [
179       ":ppapi_cpp_lib",
180       "//ppapi/native_client:ppapi_lib",
181     ]
182   }
184   copy("nacl_tests_copy") {
185     sources = [
186       "${root_out_dir}/ppapi_nacl_tests_newlib.nexe",
187     ]
188     outputs = [
189       "${root_build_dir}/{{source_name_part}}_${target_cpu}.nexe",
190     ]
191     deps = [
192       ":ppapi_nacl_tests_newlib",
193     ]
194   }
197 group("ppapi_nacl_tests") {
198   deps = []
199   if (target_cpu == "x86" || target_cpu == "x64") {
200     deps += [ ":nacl_tests_copy(//native_client/build/toolchain/nacl:clang_newlib_${target_cpu})" ]
201   }