OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 source_set("webp_transcode") { | 5 source_set("ios") { |
6 sources = [ | 6 sources = [ |
| 7 "raw_image_fetcher.h", |
| 8 "raw_image_fetcher.mm", |
7 "webp_decoder.h", | 9 "webp_decoder.h", |
8 "webp_decoder.mm", | 10 "webp_decoder.mm", |
9 ] | 11 ] |
10 deps = [ | 12 deps = [ |
11 "//base", | 13 "//base", |
| 14 "//ios/web", |
| 15 "//net", |
12 "//third_party/libwebp:libwebp_dec", | 16 "//third_party/libwebp:libwebp_dec", |
13 ] | 17 ] |
14 } | 18 } |
15 | 19 |
| 20 source_set("test_support") { |
| 21 testonly = true |
| 22 sources = [ |
| 23 "mock_raw_image_fetcher.h", |
| 24 "mock_raw_image_fetcher.mm", |
| 25 ] |
| 26 deps = [ |
| 27 ":ios", |
| 28 "//testing/gmock", |
| 29 ] |
| 30 } |
| 31 |
16 source_set("unit_tests") { | 32 source_set("unit_tests") { |
17 testonly = true | 33 testonly = true |
18 sources = [ | 34 sources = [ |
| 35 "raw_image_fetcher_unittest.mm", |
19 "webp_decoder_unittest.mm", | 36 "webp_decoder_unittest.mm", |
20 ] | 37 ] |
21 deps = [ | 38 deps = [ |
22 ":webp_transcode", | 39 ":ios", |
23 ":webp_transcode_unit_tests_bundle_data", | 40 ":webp_transcode_unit_tests_bundle_data", |
24 "//base", | 41 "//base", |
| 42 "//net", |
| 43 "//net:test_support", |
25 "//testing/gmock", | 44 "//testing/gmock", |
26 "//testing/gtest", | 45 "//testing/gtest", |
27 ] | 46 ] |
28 libs = [ "CoreGraphics.framework" ] | |
29 } | 47 } |
30 | 48 |
31 bundle_data("webp_transcode_unit_tests_bundle_data") { | 49 bundle_data("webp_transcode_unit_tests_bundle_data") { |
32 visibility = [ ":unit_tests" ] | 50 visibility = [ ":unit_tests" ] |
33 testonly = true | 51 testonly = true |
34 sources = [ | 52 sources = [ |
35 "//ios/chrome/test/data/webp_transcode/test.jpg", | 53 "//components/test/data/webp_transcode/test.jpg", |
36 "//ios/chrome/test/data/webp_transcode/test.webp", | 54 "//components/test/data/webp_transcode/test.webp", |
37 "//ios/chrome/test/data/webp_transcode/test_alpha.png", | 55 "//components/test/data/webp_transcode/test_alpha.png", |
38 "//ios/chrome/test/data/webp_transcode/test_alpha.webp", | 56 "//components/test/data/webp_transcode/test_alpha.webp", |
39 "//ios/chrome/test/data/webp_transcode/test_small.tiff", | 57 "//components/test/data/webp_transcode/test_small.tiff", |
40 "//ios/chrome/test/data/webp_transcode/test_small.webp", | 58 "//components/test/data/webp_transcode/test_small.webp", |
41 ] | 59 ] |
42 outputs = [ | 60 outputs = [ |
43 "{{bundle_resources_dir}}/{{source_root_relative_dir}}/" + | 61 "{{bundle_resources_dir}}/{{source_root_relative_dir}}/" + |
44 "{{source_file_part}}", | 62 "{{source_file_part}}", |
45 ] | 63 ] |
46 } | 64 } |
OLD | NEW |