Index: components/os_crypt/BUILD.gn |
diff --git a/components/os_crypt/BUILD.gn b/components/os_crypt/BUILD.gn |
index e283deae0881d16e8277ebeadf54de93eb238223..93fb9983605ec9d4a5700316fc8377ef6fe2755e 100644 |
--- a/components/os_crypt/BUILD.gn |
+++ b/components/os_crypt/BUILD.gn |
@@ -54,6 +54,22 @@ source_set("os_crypt") { |
} |
} |
+source_set("test_support") { |
+ testonly = true |
+ sources = [ |
+ "os_crypt_mocker.cc", |
+ "os_crypt_mocker.h", |
+ ] |
+ deps = [ |
+ ":os_crypt", |
+ "//base", |
+ ] |
+ if (is_desktop_linux && use_glib) { |
+ deps += [ "//third_party/libsecret" ] |
+ defines = [ "USE_LIBSECRET" ] |
+ } |
+} |
+ |
source_set("unit_tests") { |
testonly = true |
sources = [ |
@@ -63,8 +79,14 @@ source_set("unit_tests") { |
] |
deps = [ |
":os_crypt", |
+ ":test_support", |
"//base", |
"//crypto", |
"//testing/gtest", |
] |
+ |
+ if (is_desktop_linux && use_glib) { |
+ deps += [ "//third_party/libsecret" ] |
+ defines = [ "USE_LIBSECRET" ] |
+ } |
} |