1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
|
# 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/config/chromeos/args.gni")
source_set("smart_card") {
if (is_chromeos) {
sources = [
"chromeos_smart_card_delegate.cc",
"chromeos_smart_card_delegate.h",
"get_smart_card_context_factory.cc",
"get_smart_card_context_factory.h",
"smart_card_histograms.cc",
"smart_card_histograms.h",
"smart_card_permission_context.cc",
"smart_card_permission_context.h",
"smart_card_permission_context_factory.cc",
"smart_card_permission_context_factory.h",
"smart_card_permission_request.cc",
"smart_card_permission_request.h",
"smart_card_reader_tracker.cc",
"smart_card_reader_tracker.h",
"smart_card_reader_tracker_factory.cc",
"smart_card_reader_tracker_factory.h",
"smart_card_reader_tracker_impl.cc",
"smart_card_reader_tracker_impl.h",
]
if (!is_chromeos_device) {
# When making a chromeos build for a dev linux machine, use a fake smart
# card device service to make manual testing during development possible.
sources += [
"fake_smart_card_device_service.cc",
"fake_smart_card_device_service.h",
"fake_smart_card_device_service_factory.cc",
"fake_smart_card_device_service_factory.h",
]
}
deps = [
"//chrome/browser/chromeos/extensions/smart_card_provider_private",
"//chrome/browser/content_settings:content_settings_factory",
"//chrome/browser/permissions",
"//chrome/browser/profiles:profile",
"//chrome/browser/ui/browser_window",
"//components/content_settings/browser:browser",
"//components/permissions",
"//components/strings:components_strings_grit",
"//content/public/browser",
]
}
public_deps = [ "//chrome/browser:browser_public_dependencies" ]
# TODO(crbug.com/40247152): Add chrome_smart_card_delegate.* for Win/Mac/Linux
# and move smart_card_* out of the is_chromeos guard.
}
if (is_chromeos) {
source_set("unit_tests") {
testonly = true
sources = [
"smart_card_permission_context_unittest.cc",
"smart_card_reader_tracker_impl_unittest.cc",
]
deps = [
":smart_card",
"//chrome/browser/content_settings:content_settings_factory",
"//chrome/browser/permissions",
"//chrome/test:test_support",
"//content/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
}
source_set("browser_tests") {
testonly = true
sources = [ "chromeos_smart_card_delegate_browsertest.cc" ]
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
deps = [
"//chrome/browser/smart_card:smart_card",
"//chrome/browser/web_applications:web_applications_test_support",
"//chrome/test:test_support",
"//components/content_settings/browser:browser",
"//content/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
}
source_set("interactive_ui_tests") {
testonly = true
# From test("interactive_ui_tests")
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
sources = [ "smart_card_permission_uitest.cc" ]
deps = [
":smart_card",
"//chrome/browser",
"//chrome/browser/content_settings:content_settings_factory",
"//chrome/browser/permissions:permissions",
"//chrome/browser/policy:test_support",
"//chrome/browser/profiles:profile",
"//chrome/browser/ui",
"//chrome/test:test_support_ui",
"//components/permissions:permissions_common",
"//content/test:test_support",
]
}
} # is_chromeos
|