blob: f9329a6cf9fa3620f4846e50fb28e0757c5eca56 [file] [log] [blame]
# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/buildflag_header.gni")
import("//third_party/protobuf/proto_library.gni")
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
}
group("unit_tests") {
testonly = true
deps = [
"//components/data_sharing/internal:unit_tests",
"//components/data_sharing/migration/internal:unit_tests",
"//components/data_sharing/public:unit_tests",
]
data_deps = [ ":components_unittests_gtest_filter" ]
}
source_set("components_unittests_gtest_filter") {
testonly = true
data = [ "components_unittests.filter" ]
}
proto_library("personal_collaboration_data_test_support_proto") {
testonly = true
sources =
[ "test_support/extended_shared_tab_group_account_data_specifics.proto" ]
}
source_set("test_support") {
testonly = true
sources = [
"test_support/fake_data_sharing_sdk_delegate.cc",
"test_support/fake_data_sharing_sdk_delegate.h",
"test_support/mock_data_sharing_network_loader.cc",
"test_support/mock_data_sharing_network_loader.h",
"test_support/mock_data_sharing_service.cc",
"test_support/mock_data_sharing_service.h",
"test_support/mock_personal_collaboration_data_service.cc",
"test_support/mock_personal_collaboration_data_service.h",
"test_support/mock_preview_server_proxy.cc",
"test_support/mock_preview_server_proxy.h",
"test_support/test_utils.cc",
"test_support/test_utils.h",
]
deps = [ "//services/network/public/cpp" ]
public_deps = [
"//base",
"//components/data_sharing/internal",
"//components/data_sharing/public",
"//components/data_sharing/public:personal_collaboration_data",
"//net/traffic_annotation",
"//testing/gmock",
"//testing/gtest",
"//url",
]
}
if (is_android) {
android_library("test_support_java") {
testonly = true
sources = [
"test_support/android/java/src/org/chromium/components/data_sharing/SharedGroupTestHelper.java",
"test_support/android/java/src/org/chromium/components/data_sharing/TestDataSharingService.java",
]
deps = [
"//base:base_java",
"//components/collaboration/public:core_java",
"//components/data_sharing/public:logger_java",
"//components/data_sharing/public:public_java",
"//components/signin/public/android:java",
"//google_apis/gaia/android:java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/jni_zero:jni_zero_java",
"//third_party/mockito:mockito_java",
"//url:gurl_java",
]
}
}