OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
| 5 import("//third_party/protobuf/proto_library.gni") |
| 6 |
5 static_library("crx_file") { | 7 static_library("crx_file") { |
6 sources = [ | 8 sources = [ |
7 "crx2_file.cc", | 9 "crx2_file.cc", |
8 "crx2_file.h", | 10 "crx2_file.h", |
9 "crx_verifier.cc", | 11 "crx_verifier.cc", |
10 "crx_verifier.h", | 12 "crx_verifier.h", |
11 "id_util.cc", | 13 "id_util.cc", |
12 "id_util.h", | 14 "id_util.h", |
13 ] | 15 ] |
14 | 16 |
15 deps = [ | 17 deps = [ |
16 "//base", | 18 "//base", |
17 "//crypto", | 19 "//crypto", |
18 ] | 20 ] |
| 21 |
| 22 public_deps = [ |
| 23 ":crx3_proto", |
| 24 ] |
| 25 } |
| 26 |
| 27 bundle_data("unit_tests_bundle_data") { |
| 28 visibility = [ ":unit_tests" ] |
| 29 testonly = true |
| 30 sources = [ |
| 31 "//components/test/data/crx_file/unsigned.crx3", |
| 32 "//components/test/data/crx_file/valid.crx2", |
| 33 "//components/test/data/crx_file/valid_no_publisher.crx3", |
| 34 "//components/test/data/crx_file/valid_publisher.crx3", |
| 35 ] |
| 36 outputs = [ |
| 37 "{{bundle_resources_dir}}/" + |
| 38 "{{source_root_relative_dir}}/{{source_file_part}}", |
| 39 ] |
19 } | 40 } |
20 | 41 |
21 source_set("unit_tests") { | 42 source_set("unit_tests") { |
22 testonly = true | 43 testonly = true |
23 sources = [ | 44 sources = [ |
| 45 "crx_verifier_unittest.cc", |
24 "id_util_unittest.cc", | 46 "id_util_unittest.cc", |
25 ] | 47 ] |
26 | 48 |
27 deps = [ | 49 deps = [ |
28 ":crx_file", | 50 ":crx_file", |
| 51 ":unit_tests_bundle_data", |
29 "//base", | 52 "//base", |
30 "//testing/gtest", | 53 "//testing/gtest", |
31 ] | 54 ] |
32 } | 55 } |
| 56 |
| 57 proto_library("crx3_proto") { |
| 58 sources = [ |
| 59 "crx3.proto", |
| 60 ] |
| 61 } |
OLD | NEW |