summaryrefslogtreecommitdiff
path: root/testing/BUILD.gn
blob: 8494fc38efa8233a5094535d96a1d7a82c15356d (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Copyright 2018 The PDFium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/jumbo.gni")
import("../pdfium.gni")

jumbo_source_set("test_support") {
  testonly = true
  sources = [
    "fx_string_testhelpers.cpp",
    "fx_string_testhelpers.h",
    "pseudo_retainable.h",
    "string_write_stream.cpp",
    "string_write_stream.h",
    "test_support.cpp",
    "test_support.h",
    "utils/bitmap_saver.cpp",
    "utils/bitmap_saver.h",
    "utils/path_service.cpp",
    "utils/path_service.h",
  ]
  data = [
    "resources/",
  ]
  deps = [
    "../:pdfium",
    "../core/fdrm",
    "image_diff",
    "//testing/gmock",
    "//testing/gtest",
  ]
  configs += [ "../:pdfium_core_config" ]
  visibility = [ "../*" ]

  if (pdf_enable_v8) {
    deps += [
      "//v8",
      "//v8:v8_libplatform",
    ]
    configs += [ "//v8:external_startup_data" ]
  }
}

jumbo_source_set("embedder_test_support") {
  testonly = true
  sources = [
    "embedder_test.cpp",
    "embedder_test.h",
    "embedder_test_mock_delegate.h",
    "embedder_test_timer_handling_delegate.h",
    "fake_file_access.cpp",
    "fake_file_access.h",
    "range_set.cpp",
    "range_set.h",
  ]

  deps = [
    ":test_support",
    "../:pdfium",
    "../core/fdrm",
    "//testing/gmock",
    "//testing/gtest",
  ]
  configs += [ "../:pdfium_core_config" ]
  visibility = [ "../*" ]

  if (pdf_enable_v8) {
    sources += [
      "js_embedder_test.cpp",
      "js_embedder_test.h",
    ]
    deps += [ "../fxjs" ]
  }

  if (pdf_enable_xfa) {
    sources += [
      "xfa_js_embedder_test.cpp",
      "xfa_js_embedder_test.h",
    ]
    deps += [
      "../fpdfsdk",
      "../fpdfsdk/fpdfxfa",
      "../xfa/fxfa",
      "../xfa/fxfa/parser",
    ]
  }
}