blob: 57667dbba0330a1bb2ada3b94a9f0a5b6d5b7204 [file] [log] [blame]
[email protected]478ed232014-08-19 02:10:551# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
waffles11f044432017-05-24 19:50:025import("//third_party/protobuf/proto_library.gni")
6
brettw8deee3902016-07-22 03:55:527static_library("crx_file") {
[email protected]478ed232014-08-19 02:10:558 sources = [
Joshua Pawlickib8bc9f92017-10-16 17:23:529 "crx_file.h",
waffles5918d5f2017-05-23 01:45:2810 "crx_verifier.cc",
11 "crx_verifier.h",
[email protected]fdd28372014-08-21 02:27:2612 "id_util.cc",
13 "id_util.h",
[email protected]478ed232014-08-19 02:10:5514 ]
15
16 deps = [
17 "//base",
brettw462851f72014-11-26 18:38:5518 "//crypto",
[email protected]478ed232014-08-19 02:10:5519 ]
waffles11f044432017-05-24 19:50:0220
21 public_deps = [
22 ":crx3_proto",
23 ]
24}
25
Joshua Pawlickib8bc9f92017-10-16 17:23:5226static_library("crx_creator") {
27 sources = [
28 "crx_creator.cc",
29 "crx_creator.h",
30 ]
31
32 deps = [
33 ":crx_file",
34 "//base",
35 "//crypto",
36 ]
37
38 public_deps = [
39 ":crx3_proto",
40 ]
41}
42
waffles11f044432017-05-24 19:50:0243bundle_data("unit_tests_bundle_data") {
44 visibility = [ ":unit_tests" ]
45 testonly = true
46 sources = [
Joshua Pawlickib8bc9f92017-10-16 17:23:5247 "//components/test/data/crx_file/sample.zip",
waffles11f044432017-05-24 19:50:0248 "//components/test/data/crx_file/unsigned.crx3",
49 "//components/test/data/crx_file/valid.crx2",
50 "//components/test/data/crx_file/valid_no_publisher.crx3",
51 "//components/test/data/crx_file/valid_publisher.crx3",
52 ]
53 outputs = [
54 "{{bundle_resources_dir}}/" +
55 "{{source_root_relative_dir}}/{{source_file_part}}",
56 ]
[email protected]478ed232014-08-19 02:10:5557}
[email protected]fdd28372014-08-21 02:27:2658
59source_set("unit_tests") {
Brett Wilson0c8745a2014-09-08 22:59:4960 testonly = true
[email protected]fdd28372014-08-21 02:27:2661 sources = [
Joshua Pawlickib8bc9f92017-10-16 17:23:5262 "crx_creator_unittest.cc",
waffles11f044432017-05-24 19:50:0263 "crx_verifier_unittest.cc",
[email protected]fdd28372014-08-21 02:27:2664 "id_util_unittest.cc",
65 ]
66
67 deps = [
Joshua Pawlickib8bc9f92017-10-16 17:23:5268 ":crx_creator",
[email protected]fdd28372014-08-21 02:27:2669 ":crx_file",
waffles11f044432017-05-24 19:50:0270 ":unit_tests_bundle_data",
brettw462851f72014-11-26 18:38:5571 "//base",
Joshua Pawlickib8bc9f92017-10-16 17:23:5272 "//crypto",
[email protected]fdd28372014-08-21 02:27:2673 "//testing/gtest",
74 ]
75}
waffles11f044432017-05-24 19:50:0276
77proto_library("crx3_proto") {
78 sources = [
79 "crx3.proto",
80 ]
81}