[email protected] | 478ed23 | 2014-08-19 02:10:55 | [diff] [blame] | 1 | # 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 | |
waffles | 11f04443 | 2017-05-24 19:50:02 | [diff] [blame] | 5 | import("//third_party/protobuf/proto_library.gni") |
| 6 | |
brettw | 8deee390 | 2016-07-22 03:55:52 | [diff] [blame] | 7 | static_library("crx_file") { |
[email protected] | 478ed23 | 2014-08-19 02:10:55 | [diff] [blame] | 8 | sources = [ |
Joshua Pawlicki | b8bc9f9 | 2017-10-16 17:23:52 | [diff] [blame] | 9 | "crx_file.h", |
waffles | 5918d5f | 2017-05-23 01:45:28 | [diff] [blame] | 10 | "crx_verifier.cc", |
| 11 | "crx_verifier.h", |
[email protected] | fdd2837 | 2014-08-21 02:27:26 | [diff] [blame] | 12 | "id_util.cc", |
| 13 | "id_util.h", |
[email protected] | 478ed23 | 2014-08-19 02:10:55 | [diff] [blame] | 14 | ] |
| 15 | |
| 16 | deps = [ |
| 17 | "//base", |
brettw | 462851f7 | 2014-11-26 18:38:55 | [diff] [blame] | 18 | "//crypto", |
[email protected] | 478ed23 | 2014-08-19 02:10:55 | [diff] [blame] | 19 | ] |
waffles | 11f04443 | 2017-05-24 19:50:02 | [diff] [blame] | 20 | |
| 21 | public_deps = [ |
| 22 | ":crx3_proto", |
| 23 | ] |
| 24 | } |
| 25 | |
Joshua Pawlicki | b8bc9f9 | 2017-10-16 17:23:52 | [diff] [blame] | 26 | static_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 | |
waffles | 11f04443 | 2017-05-24 19:50:02 | [diff] [blame] | 43 | bundle_data("unit_tests_bundle_data") { |
| 44 | visibility = [ ":unit_tests" ] |
| 45 | testonly = true |
| 46 | sources = [ |
Joshua Pawlicki | b8bc9f9 | 2017-10-16 17:23:52 | [diff] [blame] | 47 | "//components/test/data/crx_file/sample.zip", |
waffles | 11f04443 | 2017-05-24 19:50:02 | [diff] [blame] | 48 | "//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] | 478ed23 | 2014-08-19 02:10:55 | [diff] [blame] | 57 | } |
[email protected] | fdd2837 | 2014-08-21 02:27:26 | [diff] [blame] | 58 | |
| 59 | source_set("unit_tests") { |
Brett Wilson | 0c8745a | 2014-09-08 22:59:49 | [diff] [blame] | 60 | testonly = true |
[email protected] | fdd2837 | 2014-08-21 02:27:26 | [diff] [blame] | 61 | sources = [ |
Joshua Pawlicki | b8bc9f9 | 2017-10-16 17:23:52 | [diff] [blame] | 62 | "crx_creator_unittest.cc", |
waffles | 11f04443 | 2017-05-24 19:50:02 | [diff] [blame] | 63 | "crx_verifier_unittest.cc", |
[email protected] | fdd2837 | 2014-08-21 02:27:26 | [diff] [blame] | 64 | "id_util_unittest.cc", |
| 65 | ] |
| 66 | |
| 67 | deps = [ |
Joshua Pawlicki | b8bc9f9 | 2017-10-16 17:23:52 | [diff] [blame] | 68 | ":crx_creator", |
[email protected] | fdd2837 | 2014-08-21 02:27:26 | [diff] [blame] | 69 | ":crx_file", |
waffles | 11f04443 | 2017-05-24 19:50:02 | [diff] [blame] | 70 | ":unit_tests_bundle_data", |
brettw | 462851f7 | 2014-11-26 18:38:55 | [diff] [blame] | 71 | "//base", |
Joshua Pawlicki | b8bc9f9 | 2017-10-16 17:23:52 | [diff] [blame] | 72 | "//crypto", |
[email protected] | fdd2837 | 2014-08-21 02:27:26 | [diff] [blame] | 73 | "//testing/gtest", |
| 74 | ] |
| 75 | } |
waffles | 11f04443 | 2017-05-24 19:50:02 | [diff] [blame] | 76 | |
| 77 | proto_library("crx3_proto") { |
| 78 | sources = [ |
| 79 | "crx3.proto", |
| 80 | ] |
| 81 | } |