blob: e4879e7da9be2bd8bc01fe82768bac48323645a0 [file] [log] [blame]
Will Harris29c5ff152024-01-25 01:54:051# Copyright 2024 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5assert(is_win)
6
7source_set("os_crypt") {
8 sources = [
Will Harrisdda71e212024-03-25 23:56:399 "app_bound_encryption_provider_win.cc",
10 "app_bound_encryption_provider_win.h",
Will Harris29c5ff152024-01-25 01:54:0511 ]
12
13 deps = [
14 "//base",
Will Harrise8e7ff32024-03-19 22:41:4215 "//chrome/common:channel_info",
Will Harris29c5ff152024-01-25 01:54:0516 "//chrome/install_static:install_static_util",
Will Harrisdda71e212024-03-25 23:56:3917 "//components/os_crypt/async/browser:key_provider_interface",
Will Harris29c5ff152024-01-25 01:54:0518 "//components/prefs:prefs",
19 "//content/public/browser",
20 ]
21
Will Harrisdda71e212024-03-25 23:56:3922 public_deps = [ ":app_bound_api" ]
23}
24
25# The API sources are separated out for the purposes of linking cleanly with the
26# test executable, but the public 'os_crypt' target should be depended upon.
27source_set("app_bound_api") {
28 visibility = [ ":*" ]
29 sources = [
30 "app_bound_encryption_win.cc",
31 "app_bound_encryption_win.h",
32 ]
33
34 deps = [
35 "//base",
Will Harrisccb80ba2024-04-02 23:07:4036 "//chrome/common:constants",
Will Harrisdda71e212024-03-25 23:56:3937 "//chrome/elevation_service:public_headers",
38 "//chrome/install_static:install_static_util",
Will Harrisceadf692024-04-03 20:44:0439 "//components/prefs:prefs",
Will Harris9850d5d2024-07-19 21:15:2940 "//components/sync/base",
Will Harrisdda71e212024-03-25 23:56:3941 ]
Will Harris29c5ff152024-01-25 01:54:0542}
43
44source_set("browser_tests") {
45 testonly = true
46 sources = [ "app_bound_encryption_win_browsertest.cc" ]
47
48 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
49
50 deps = [
51 ":os_crypt",
Will Harris3c20d1c22024-01-26 23:14:4852 ":test_support",
Will Harris29c5ff152024-01-25 01:54:0553 "//base",
Will Harrisdda71e212024-03-25 23:56:3954 "//chrome/elevation_service:public_headers",
Will Harris3c20d1c22024-01-26 23:14:4855 "//chrome/test:test_support",
Will Harris586208b52024-10-19 00:34:1856 "//chrome/windows_services/service_program/test_support",
Will Harris3c20d1c22024-01-26 23:14:4857 "//content/test:test_support",
58 ]
59
Will Harrisca6ed062024-02-10 03:40:2560 if (!is_component_build) {
61 data_deps = [ ":app_binary" ]
62 }
Will Harris3c20d1c22024-01-26 23:14:4863}
64
Will Harrise9a77f0c2025-04-16 21:21:2865source_set("unit_tests") {
66 testonly = true
Will Harris27d37592025-04-23 19:59:3267 sources = [
68 "app_bound_encryption_provider_win_unittest.cc",
69 "app_bound_encryption_win_unittest.cc",
70 ]
Will Harrise9a77f0c2025-04-16 21:21:2871
72 deps = [
73 ":os_crypt",
74 ":test_support",
75 "//base",
Will Harris27d37592025-04-23 19:59:3276 "//base/test:test_support",
Will Harrise9a77f0c2025-04-16 21:21:2877 "//chrome/elevation_service:public_headers",
Will Harris27d37592025-04-23 19:59:3278 "//components/prefs",
79 "//components/prefs:test_support",
Will Harrise9a77f0c2025-04-16 21:21:2880 "//testing/gmock",
81 "//testing/gtest",
82 ]
83}
84
Will Harris3c20d1c22024-01-26 23:14:4885source_set("test_support") {
86 testonly = true
87 sources = [
88 "test_support.cc",
89 "test_support.h",
90 ]
91 deps = [
92 "//base",
93 "//chrome/elevation_service:public_headers",
94 "//chrome/install_static:install_static_util",
Will Harris29c5ff152024-01-25 01:54:0595 "//chrome/install_static/test:test_support",
96 "//chrome/installer/util:constants",
Will Harris3c20d1c22024-01-26 23:14:4897 "//chrome/installer/util:work_item",
Will Harris586208b52024-10-19 00:34:1898 "//chrome/windows_services/service_program/test_support",
Will Harris3c20d1c22024-01-26 23:14:4899 ]
100}
101
102# This binary is launched by the browser tests and makes calls to the app-bound
Will Harrisca6ed062024-02-10 03:40:25103# service to test the functionality for various executable callers. It cannot
104# be used in a component build because it needs to function from any directory
105# on the system as part of the test.
106if (!is_component_build) {
107 executable("app_binary") {
108 testonly = true
109 sources = [ "app_bound_encryption_test_main.cc" ]
110 deps = [
Will Harrisdda71e212024-03-25 23:56:39111 ":app_bound_api",
Will Harrisca6ed062024-02-10 03:40:25112 ":test_support",
113 "//base",
114 "//chrome/install_static/test:test_support",
115 ]
116 }
Will Harris29c5ff152024-01-25 01:54:05117}