2
# Copyright (C) 2012 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.
34
'source_dir': '../../../Source',
36
# Location of the chromium src directory and target type is different
37
# if webkit is built inside chromium or as standalone project.
38
['inside_chromium_build==0', {
39
# Webkit is being built outside of the full chromium project.
40
# e.g. via build-webkit --chromium
41
'chromium_src_dir': '<(source_dir)/WebKit/chromium',
43
# WebKit is checked out in src/chromium/third_party/WebKit
44
'chromium_src_dir': '<(tools_dir)/../../..',
49
'../TestWebKitAPI.gypi',
50
'../../../Source/WebKit/chromium/features.gypi',
54
'target_name': 'TestWebKitAPI',
57
'<(source_dir)/WebKit/chromium/WebKit.gyp:webkit',
58
'<(source_dir)/WTF/WTF.gyp/WTF.gyp:wtf',
59
'<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
60
'<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
61
'<(chromium_src_dir)/base/base.gyp:test_support_base',
62
'<(chromium_src_dir)/testing/gtest.gyp:gtest',
63
'<(chromium_src_dir)/testing/gmock.gyp:gmock',
64
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
67
'<(tools_dir)/TestWebKitAPI',
68
# Needed by tests/RunAllTests.cpp, as well as ChromiumCurrentTime.cpp and
69
# ChromiumThreading.cpp in chromium shared library configuration.
70
'<(source_dir)/WebKit/chromium/public',
73
# Reuse the same testing driver of Chromium's webkit_unit_tests.
74
'<(source_dir)/WebKit/chromium/tests/RunAllTests.cpp',
75
'<@(TestWebKitAPI_files)',
78
['inside_chromium_build==1 and component=="shared_library"', {
80
# To satisfy linking of WTF::currentTime() etc. in shared library configuration,
81
# as the symbols are not exported from the DLLs.
82
'<(source_dir)/WebKit/chromium/src/ChromiumCurrentTime.cpp',
83
'<(source_dir)/WebKit/chromium/src/ChromiumThreading.cpp',
86
['OS=="android" and gtest_target_type == "shared_library"', {
87
'type': 'shared_library',
89
'<(chromium_src_dir)/testing/android/native_test.gyp:native_test_native_code',
96
['OS=="android" and gtest_target_type == "shared_library"', {
97
# Wrap libTestWebKitAPI.so into an android apk for execution.
99
'target_name': 'TestWebKitAPI_apk',
102
'<(chromium_src_dir)/base/base.gyp:base',
106
'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)TestWebKitAPI<(SHARED_LIB_SUFFIX)',
107
'input_jars_paths': [
108
'<(PRODUCT_DIR)/lib.java/chromium_base.jar',
111
['inside_chromium_build==1', {
112
'ant_build_to_chromium_src': '<(ant_build_out)/../../',
114
'ant_build_to_chromium_src': '<(chromium_src_dir)',
118
# Part of the following was copied from <(chromium_src_dir)/build/apk_test.gpyi.
119
# Not including it because gyp include doesn't support variable in path or under
120
# conditions. And we also have some different requirements.
122
'action_name': 'apk_TestWebKitAPI',
123
'message': 'Building TestWebKitAPI test apk.',
125
'<(chromium_src_dir)/testing/android/AndroidManifest.xml',
126
'<(chromium_src_dir)/testing/android/generate_native_test.py',
127
'<(input_shlib_path)',
128
'<@(input_jars_paths)',
131
'<(PRODUCT_DIR)/TestWebKitAPI_apk/TestWebKitAPI-debug.apk',
134
'<(chromium_src_dir)/testing/android/generate_native_test.py',
136
'<(input_shlib_path)',
138
'"<@(input_jars_paths)"',
140
'<(PRODUCT_DIR)/TestWebKitAPI_apk',
141
'--strip-binary=<(android_strip)',
143
'-DANDROID_SDK=<(android_sdk)',
145
'-DANDROID_SDK_ROOT=<(android_sdk_root)',
147
'-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
149
'-DANDROID_SDK_VERSION=<(android_sdk_version)',
151
'-DANDROID_TOOLCHAIN=<(android_toolchain)',
153
'-DANDROID_GDBSERVER=<(android_gdbserver)',
155
'-DPRODUCT_DIR=<(ant_build_out)',
157
'-DCHROMIUM_SRC=<(ant_build_to_chromium_src)',
159
'<(android_app_abi)',