| # Copyright 2022 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| source_set("unit_tests") { |
| testonly = true |
| sources = [ |
| "cookie_access_filter_unittest.cc", |
| "dips_bounce_detector_unittest.cc", |
| "dips_database_unittest.cc", |
| "dips_service_unittest.cc", |
| "dips_storage_unittest.cc", |
| "dips_utils_unittest.cc", |
| ] |
| |
| deps = [ |
| ":golden_dbs_bundle_data", |
| "//base", |
| "//base/test:test_support", |
| "//chrome/browser", |
| "//chrome/test:test_support", |
| "//components/ukm:test_support", |
| "//content/test:test_support", |
| "//sql:test_support", |
| "//testing/gtest", |
| "//url", |
| ] |
| |
| data = [ "//chrome/test/data/dips/v1.sql" ] |
| } |
| |
| bundle_data("golden_dbs_bundle_data") { |
| visibility = [ ":unit_tests" ] |
| testonly = true |
| sources = [ "//chrome/test/data/dips/v1.sql" ] |
| outputs = [ "{{bundle_resources_dir}}/" + |
| "{{source_root_relative_dir}}/{{source_file_part}}" ] |
| } |
| |
| source_set("browser_tests") { |
| testonly = true |
| sources = [ |
| "dips_bounce_detector_browsertest.cc", |
| "dips_helper_browsertest.cc", |
| ] |
| |
| defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] |
| |
| deps = [ |
| "//base", |
| "//base/test:test_support", |
| "//chrome/browser", |
| "//chrome/browser/browsing_data:constants", |
| "//chrome/browser/ui", |
| "//chrome/test:test_support", |
| "//components/ukm:test_support", |
| "//content/test:test_support", |
| "//net:test_support", |
| "//testing/gtest", |
| "//third_party/blink/public/common", |
| ] |
| |
| if (is_android) { |
| deps += [ "//chrome/test:test_support_ui_android" ] |
| } else { |
| deps += [ "//chrome/test:test_support_ui" ] |
| } |
| } |