blob: 1b5653443dcb18bb4bb0505ca830df266b2f836c [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 = [
9 "app_bound_encryption_metrics_win.cc",
10 "app_bound_encryption_metrics_win.h",
Will Harrisdda71e212024-03-25 23:56:3911 "app_bound_encryption_provider_win.cc",
12 "app_bound_encryption_provider_win.h",
Will Harris29c5ff152024-01-25 01:54:0513 ]
14
15 deps = [
16 "//base",
Will Harrise8e7ff32024-03-19 22:41:4217 "//chrome/common:channel_info",
Will Harris29c5ff152024-01-25 01:54:0518 "//chrome/install_static:install_static_util",
Will Harrisdda71e212024-03-25 23:56:3919 "//components/os_crypt/async/browser:key_provider_interface",
Will Harris29c5ff152024-01-25 01:54:0520 "//components/prefs:prefs",
21 "//content/public/browser",
22 ]
23
Will Harrisdda71e212024-03-25 23:56:3924 public_deps = [ ":app_bound_api" ]
25}
26
27# The API sources are separated out for the purposes of linking cleanly with the
28# test executable, but the public 'os_crypt' target should be depended upon.
29source_set("app_bound_api") {
30 visibility = [ ":*" ]
31 sources = [
32 "app_bound_encryption_win.cc",
33 "app_bound_encryption_win.h",
34 ]
35
36 deps = [
37 "//base",
Will Harrisccb80ba2024-04-02 23:07:4038 "//chrome/common:constants",
Will Harrisdda71e212024-03-25 23:56:3939 "//chrome/elevation_service:public_headers",
40 "//chrome/install_static:install_static_util",
Will Harrisceadf692024-04-03 20:44:0441 "//components/prefs:prefs",
Will Harrisdda71e212024-03-25 23:56:3942 ]
Will Harris29c5ff152024-01-25 01:54:0543}
44
45source_set("browser_tests") {
46 testonly = true
47 sources = [ "app_bound_encryption_win_browsertest.cc" ]
48
49 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
50
51 deps = [
52 ":os_crypt",
Will Harris3c20d1c2024-01-26 23:14:4853 ":test_support",
Will Harris29c5ff152024-01-25 01:54:0554 "//base",
Will Harrisdda71e212024-03-25 23:56:3955 "//chrome/elevation_service:public_headers",
Will Harris3c20d1c2024-01-26 23:14:4856 "//chrome/test:test_support",
57 "//content/test:test_support",
58 ]
59
Will Harrisca6ed062024-02-10 03:40:2560 if (!is_component_build) {
61 data_deps = [ ":app_binary" ]
62 }
Will Harris3c20d1c2024-01-26 23:14:4863}
64
65source_set("test_support") {
66 testonly = true
67 sources = [
68 "test_support.cc",
69 "test_support.h",
70 ]
71 deps = [
72 "//base",
73 "//chrome/elevation_service:public_headers",
74 "//chrome/install_static:install_static_util",
Will Harris29c5ff152024-01-25 01:54:0575 "//chrome/install_static/test:test_support",
76 "//chrome/installer/util:constants",
Will Harris3c20d1c2024-01-26 23:14:4877 "//chrome/installer/util:work_item",
78 ]
79}
80
81# This binary is launched by the browser tests and makes calls to the app-bound
Will Harrisca6ed062024-02-10 03:40:2582# service to test the functionality for various executable callers. It cannot
83# be used in a component build because it needs to function from any directory
84# on the system as part of the test.
85if (!is_component_build) {
86 executable("app_binary") {
87 testonly = true
88 sources = [ "app_bound_encryption_test_main.cc" ]
89 deps = [
Will Harrisdda71e212024-03-25 23:56:3990 ":app_bound_api",
Will Harrisca6ed062024-02-10 03:40:2591 ":test_support",
92 "//base",
93 "//chrome/install_static/test:test_support",
94 ]
95 }
Will Harris29c5ff152024-01-25 01:54:0596}