BUILD.gn 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Copyright 2022 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. import("//pdf/features.gni")
  5. import("//testing/test.gni")
  6. assert(enable_pdf)
  7. source_set("loader") {
  8. visibility = [
  9. # TODO(crbug.com/1158929): Eliminate
  10. # chrome_find_request_manager_browsertest.cc's dependence on
  11. # document_loader_impl.h.
  12. "//chrome/test:browser_tests${exec_target_suffix}",
  13. "//pdf/*",
  14. ]
  15. friend = [
  16. ":unit_tests",
  17. "//pdf:pdf_test_utils",
  18. ]
  19. sources = [
  20. "chunk_stream.h",
  21. "document_loader_impl.cc",
  22. "range_set.cc",
  23. "range_set.h",
  24. "url_loader.cc",
  25. "url_loader_wrapper.h",
  26. "url_loader_wrapper_impl.cc",
  27. ]
  28. configs += [ "//pdf:strict" ]
  29. public = [
  30. "document_loader.h",
  31. "document_loader_impl.h",
  32. "result_codes.h",
  33. "url_loader.h",
  34. "url_loader_wrapper_impl.h",
  35. ]
  36. deps = [
  37. "//base",
  38. "//net",
  39. "//pdf:features",
  40. "//third_party/blink/public:blink",
  41. "//ui/gfx/range",
  42. "//url",
  43. ]
  44. }
  45. source_set("unit_tests") {
  46. testonly = true
  47. visibility = [ "//pdf:pdf_unittests${exec_target_suffix}" ]
  48. sources = [
  49. "chunk_stream_unittest.cc",
  50. "document_loader_impl_unittest.cc",
  51. "range_set_unittest.cc",
  52. "url_loader_unittest.cc",
  53. ]
  54. configs += [ "//pdf:strict" ]
  55. deps = [
  56. ":loader",
  57. "//base",
  58. "//base/test:test_support",
  59. "//net",
  60. "//pdf:features",
  61. "//pdf:pdf_test_utils",
  62. "//testing/gmock",
  63. "//testing/gtest",
  64. "//third_party/blink/public:blink",
  65. "//ui/gfx/range",
  66. "//url",
  67. ]
  68. }