2 # Copyright (C) 2011 Google Inc. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above
11 # copyright notice, this list of conditions and the following disclaimer
12 # in the documentation and/or other materials provided with the
14 # * Neither the name of Google Inc. nor the names of its
15 # contributors may be used to endorse or promote products derived from
16 # this software without specific prior written permission.
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 '../bindings/bindings.gypi',
34 '../build/features.gypi',
35 '../build/scripts/scripts.gypi',
37 '../modules/modules.gypi',
38 '../platform/blink_platform.gypi',
44 # GN version: //third_party/WebKit/Source/web:webkit_unit_tests
45 'target_name': 'webkit_unit_tests',
47 'variables': { 'enable_wexit_time_destructors': 1, },
49 '../../public/blink.gyp:blink',
50 '../config.gyp:unittest_config',
51 '../platform/blink_platform_tests.gyp:blink_platform_test_support',
52 '../wtf/wtf_tests.gyp:wtf_unittest_helpers',
53 'web.gyp:blink_web_test_support',
54 '<(DEPTH)/base/base.gyp:base',
55 '<(DEPTH)/base/base.gyp:base_i18n',
56 '<(DEPTH)/base/base.gyp:test_support_base',
57 '<(DEPTH)/testing/gmock.gyp:gmock',
58 '<(DEPTH)/testing/gtest.gyp:gtest',
59 '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp',
60 '<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
61 '<(DEPTH)/url/url.gyp:url_lib',
62 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
63 '<(DEPTH)/content/content_shell_and_tests.gyp:test_support_content',
66 '../web/tests/RunAllTests.cpp',
74 ['component!="shared_library"', {
76 '../core/core.gyp:webcore',
79 'BLINK_IMPLEMENTATION=1',
83 '<@(bindings_unittest_files)',
84 '<@(platform_unittest_support_files)',
85 '<@(core_unittest_files)',
86 '<@(modules_unittest_files)',
87 '<@(platform_web_unittest_files)',
88 '<@(web_unittest_files)',
91 ['OS=="win" and component!="shared_library"', {
96 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
102 ['win_use_allocator_shim==1', {
104 '<(DEPTH)/base/allocator/allocator.gyp:allocator',
110 'type': 'shared_library',
112 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
113 '<(DEPTH)/tools/android/forwarder2/forwarder.gyp:forwarder2',
118 '../../public/web/mac',
121 [ 'os_posix==1 and OS!="mac" and OS!="android" and OS!="ios" and use_allocator!="none"', {
123 '<(DEPTH)/base/allocator/allocator.gyp:allocator',
130 ['gcc_version>=46', {
132 # Disable warnings about c++0x compatibility, as some names (such
133 # as nullptr) conflict with upcoming c++0x types.
134 'cflags_cc': ['-Wno-c++0x-compat'],
137 ['OS=="android" and gtest_target_type == "shared_library"', {
138 # Wrap libwebkit_unit_tests.so into an android apk for execution.
140 'target_name': 'webkit_unit_tests_apk',
143 '<(DEPTH)/base/base.gyp:base_java',
144 '<(DEPTH)/content/content_shell_and_tests.gyp:content_shell_pak',
145 '<(DEPTH)/net/net.gyp:net_java',
149 ['v8_use_external_startup_data==1', {
151 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8_external_snapshot',
152 '<(DEPTH)/content/content.gyp:content_v8_external_data',
157 'test_suite_name': 'webkit_unit_tests',
158 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)webkit_unit_tests<(SHARED_LIB_SUFFIX)',
159 'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'],
160 'asset_location': '<(PRODUCT_DIR)/content_shell/assets',
162 ['v8_use_external_startup_data==1', {
163 'additional_input_paths': [
164 '<(PRODUCT_DIR)/content_shell/assets/natives_blob.bin',
165 '<(PRODUCT_DIR)/content_shell/assets/snapshot_blob.bin',
168 '<(PRODUCT_DIR)/natives_blob.bin',
169 '<(PRODUCT_DIR)/snapshot_blob.bin',
174 'includes': [ '../../../../build/apk_test.gypi' ],
177 ['test_isolation_mode != "noop"', {
180 'target_name': 'webkit_unit_tests_run',
186 '../../../../build/isolate.gypi',
189 'webkit_unit_tests.isolate',