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