blob: 5f5dc1cf346864dfd28c9ab6bc98aaaab06bf216 [file] [log] [blame]
# Copyright 2014 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("//build/config/ui.gni")
import("//testing/test.gni")
import("//third_party/WebKit/Source/bindings/bindings.gni")
import("//third_party/WebKit/Source/config.gni")
import("//third_party/WebKit/Source/core/core.gni")
import("//third_party/WebKit/Source/modules/modules.gni")
import("//third_party/WebKit/Source/platform/platform.gni")
visibility = [ "//third_party/WebKit/*" ]
web_gypi = exec_script("//build/gypi_to_gn.py",
[ rebase_path("web.gypi") ],
"scope",
[ "web.gypi" ])
web_unittest_files = web_gypi.web_unittest_files
component("web") {
output_name = "blink_web"
deps = [
"//skia",
"//third_party/WebKit/Source/core",
"//third_party/WebKit/Source/modules",
"//third_party/WebKit/Source/platform",
"//third_party/angle:translator",
"//third_party/icu",
"//ui/gfx/geometry",
"//v8",
]
configs += [
"//third_party/WebKit/Source:config",
"//third_party/WebKit/Source:inside_blink",
"//third_party/WebKit/Source:non_test_config",
]
defines = [ "BLINK_WEB_IMPLEMENTATION=1" ]
sources = web_gypi.web_files
if (!use_default_render_theme) {
sources -= [ "default/WebRenderTheme.cpp" ]
}
if (is_android) {
set_sources_assignment_filter([])
sources += [ "linux/WebFontRendering.cpp" ]
set_sources_assignment_filter(sources_assignment_filter)
}
if (remove_webcore_debug_symbols) {
configs -= [ "//build/config/compiler:default_symbols" ]
configs += [ "//build/config/compiler:no_symbols" ]
}
}
# GYP version: WebKit/Source/web/web.gyp:blink_web_test_support
source_set("test_support") {
deps = [
"//skia",
"//third_party/WebKit/Source/core:testing",
"//third_party/WebKit/Source/modules:modules_testing",
"//third_party/WebKit/Source/wtf",
"//v8",
]
sources = [
"WebTestingSupport.cpp",
]
configs += [ "//third_party/WebKit/Source:config" ]
include_dirs = [ "$root_gen_dir/blink" ]
}
group("webkit_unit_tests_data") {
data = [
"tests/data/",
"../core/paint/test_data/",
]
}
# GYP version: WebKit/Source/web/web_tests.gyp:webkit_unit_tests
test("webkit_unit_tests") {
visibility = [] # Allow re-assignment of list.
visibility = [ "*" ]
deps = [
":test_support",
":web",
"//base",
"//base:i18n",
"//base/test:test_support",
"//content/test:test_support",
"//gpu:test_support",
"//testing/gmock",
"//testing/gtest",
"//third_party/WebKit/Source/core",
"//third_party/WebKit/Source/modules",
"//third_party/WebKit/Source/platform:test_support",
"//third_party/WebKit/Source/wtf",
"//third_party/WebKit/public:mojo_bindings_blink",
"//third_party/libwebp",
"//third_party/zlib",
"//url",
"//v8",
]
data_deps = [
"//content/shell:pak",
":webkit_unit_tests_data",
]
sources = [
"tests/RunAllTests.cpp",
]
sources += web_unittest_files
sources += bindings_unittest_files
sources += core_unittest_files
sources += modules_unittest_files
sources += platform_web_unittest_files
configs += [
"//third_party/WebKit/Source:config",
"//third_party/WebKit/Source:inside_blink",
]
if (is_android) {
deps += [
"//base:base_java",
"//content/public/android:content_java",
"//content/shell/android:content_shell_assets",
"//net/android:net_java",
]
}
}