blob: 677600ddcb0d2ecea6d116c5a84797ade93cc7fc [file] [log] [blame]
# Copyright 2017 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/jumbo.gni")
import("//third_party/WebKit/Source/platform/platform.gni")
# Intentionally depends on generator targets so to depend only on generated
# mojo biding header files. This is needed to use mojo interfaces from a static
# library such as platform:test_support without causing duplicated symbols.
# There is no tool to detect missing indirect generated header dependency today
# and this is easy to be broken when mojom files are updated to depend on
# another.
jumbo_source_set("generator") {
public_deps = [
"//third_party/WebKit/common:mojo_platform_bindings_blink__generator",
"//url/mojom:url_mojom_gurl_blink__generator",
"//url/mojom:url_mojom_gurl_shared__generator",
"//url/mojom:url_mojom_origin_blink__generator",
"//url/mojom:url_mojom_origin_shared__generator",
]
}
blink_platform_sources("blob") {
sources = [
"BlobBytesProvider.cpp",
"BlobBytesProvider.h",
"BlobData.cpp",
"BlobData.h",
"BlobRegistry.cpp",
"BlobRegistry.h",
"BlobURL.cpp",
"BlobURL.h",
"SerializedBlobStructTraits.cpp",
"SerializedBlobStructTraits.h",
]
deps = [
"//services/network/public/mojom:mojom_blink",
]
}
jumbo_source_set("unit_tests") {
visibility = [ "//third_party/WebKit/Source/platform:*" ]
testonly = true
sources = [
"BlobBytesProviderTest.cpp",
"BlobDataTest.cpp",
]
configs += [ "//third_party/WebKit/Source/platform:blink_platform_config" ]
deps = [
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
"//third_party/WebKit/Source/platform:platform",
]
}
jumbo_source_set("test_support") {
# This target defines test files for platform:test_support that
# blink_platform_unittests and webkit_unit_tests can use.
visibility = [ "//third_party/WebKit/Source/platform:test_support" ]
testonly = true
# Source files that can be called from blink_platform_unittests and
# webkit_unit_tests.
sources = [
"testing/FakeBlob.cpp",
"testing/FakeBlob.h",
"testing/FakeBlobRegistry.cpp",
"testing/FakeBlobRegistry.h",
"testing/FakeBlobURLStore.cpp",
"testing/FakeBlobURLStore.h",
]
configs += [
"//third_party/WebKit/Source:non_test_config",
"//third_party/WebKit/Source/platform:blink_platform_config",
]
public_deps = [
":generator",
"//third_party/WebKit/public:blink_headers",
]
}