summaryrefslogtreecommitdiff
path: root/chromium/components/image_fetcher/ios/BUILD.gn
blob: 8644fc4d470818cb95ebc3cc7d6c93512d444850 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

source_set("ios") {
  sources = [
    "ios_image_data_fetcher_wrapper.h",
    "ios_image_data_fetcher_wrapper.mm",
    "ios_image_decoder_impl.h",
    "ios_image_decoder_impl.mm",
    "webp_decoder.h",
    "webp_decoder.mm",
  ]
  deps = [
    "//base",
    "//components/image_fetcher/core",
    "//ios/web",
    "//net",
    "//third_party/libwebp:libwebp_dec",
    "//third_party/libwebp:libwebp_webp",
    "//ui/gfx",
  ]
  configs += [ "//build/config/compiler:enable_arc" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "ios_image_data_fetcher_wrapper_unittest.mm",
    "ios_image_decoder_impl_unittest.mm",
    "webp_decoder_unittest.mm",
  ]
  deps = [
    ":ios",
    ":webp_transcode_unit_tests_bundle_data",
    "//base",
    "//base/test:test_support",
    "//net",
    "//services/network:test_support",
    "//services/network/public/cpp",
    "//testing/gmock",
    "//testing/gtest",
    "//ui/gfx",
  ]
  configs += [ "//build/config/compiler:enable_arc" ]
}

bundle_data("webp_transcode_unit_tests_bundle_data") {
  visibility = [ ":unit_tests" ]
  testonly = true
  sources = [
    "//components/test/data/webp_transcode/test.jpg",
    "//components/test/data/webp_transcode/test.webp",
    "//components/test/data/webp_transcode/test_alpha.png",
    "//components/test/data/webp_transcode/test_alpha.webp",
    "//components/test/data/webp_transcode/test_small.tiff",
    "//components/test/data/webp_transcode/test_small.webp",
  ]
  outputs = [ "{{bundle_resources_dir}}/{{source_root_relative_dir}}/" +
              "{{source_file_part}}" ]
}