1# Copyright 2018 The PDFium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import("../pdfium.gni") 6 7source_set("test_support") { 8 testonly = true 9 sources = [ 10 "command_line_helpers.cpp", 11 "command_line_helpers.h", 12 "font_renamer.cpp", 13 "font_renamer.h", 14 "fx_string_testhelpers.cpp", 15 "fx_string_testhelpers.h", 16 "invalid_seekable_read_stream.cpp", 17 "invalid_seekable_read_stream.h", 18 "pseudo_retainable.h", 19 "scoped_set_tz.cpp", 20 "scoped_set_tz.h", 21 "string_write_stream.cpp", 22 "string_write_stream.h", 23 "test_fonts.cpp", 24 "test_fonts.h", 25 "test_loader.cpp", 26 "test_loader.h", 27 "test_support.h", 28 "utils/bitmap_saver.cpp", 29 "utils/bitmap_saver.h", 30 "utils/file_util.cpp", 31 "utils/file_util.h", 32 "utils/hash.cpp", 33 "utils/hash.h", 34 ] 35 data = [ "resources/" ] 36 public_deps = [ 37 ":path_service", 38 "//third_party/test_fonts", 39 ] 40 deps = [ 41 "../:pdfium_public_headers", 42 "../core/fdrm", 43 "../core/fxcrt", 44 "../core/fxge", 45 "image_diff", 46 ] 47 configs += [ 48 "../:pdfium_strict_config", 49 "../:pdfium_noshorten_config", 50 ] 51 visibility = [ "../*" ] 52 if (pdf_enable_v8) { 53 sources += [ 54 "v8_initializer.cpp", 55 "v8_initializer.h", 56 ] 57 deps += [ 58 "//v8", 59 "//v8:v8_libplatform", 60 ] 61 configs += [ "//v8:external_startup_data" ] 62 } 63} 64 65source_set("path_service") { 66 testonly = true 67 sources = [ 68 "utils/path_service.cpp", 69 "utils/path_service.h", 70 ] 71 deps = [ "../core/fxcrt" ] 72 configs += [ 73 "../:pdfium_strict_config", 74 "../:pdfium_noshorten_config", 75 ] 76 visibility = [ "../*" ] 77} 78 79source_set("test_environments") { 80 testonly = true 81 sources = [ 82 "pdf_test_environment.cpp", 83 "pdf_test_environment.h", 84 ] 85 deps = [ 86 ":test_support", 87 "../core/fxcrt", 88 "../core/fxge", 89 "//testing/gtest", 90 ] 91 configs += [ 92 "../:pdfium_strict_config", 93 "../:pdfium_noshorten_config", 94 ] 95 if (pdf_enable_v8) { 96 sources += [ 97 "v8_test_environment.cpp", 98 "v8_test_environment.h", 99 ] 100 deps += [ 101 "../fxjs", 102 "//v8", 103 "//v8:v8_libplatform", 104 ] 105 configs += [ "//v8:external_startup_data" ] 106 } 107 if (pdf_enable_xfa) { 108 sources += [ 109 "xfa_test_environment.cpp", 110 "xfa_test_environment.h", 111 ] 112 deps += [ 113 "../fxjs:gc", 114 "../xfa/fgas/font", 115 ] 116 } 117} 118 119source_set("unit_test_support") { 120 testonly = true 121 sources = [] 122 deps = [] 123 configs += [ 124 "../:pdfium_strict_config", 125 "../:pdfium_noshorten_config", 126 ] 127 public_deps = [ 128 ":test_environments", 129 ":test_support", 130 ] 131 if (pdf_enable_v8) { 132 sources += [ 133 "fxv8_unittest.cpp", 134 "fxv8_unittest.h", 135 ] 136 deps += [ 137 "../fxjs", 138 "//testing/gtest", 139 ] 140 configs += [ "//v8:external_startup_data" ] 141 if (pdf_enable_xfa) { 142 sources += [ 143 "fxgc_unittest.cpp", 144 "fxgc_unittest.h", 145 ] 146 deps += [ 147 "../fxjs:gc", 148 "//testing/gtest", 149 ] 150 } 151 } 152} 153 154source_set("embedder_test_support") { 155 testonly = true 156 sources = [ 157 "embedder_test.cpp", 158 "embedder_test.h", 159 "embedder_test_constants.cpp", 160 "embedder_test_constants.h", 161 "embedder_test_environment.cpp", 162 "embedder_test_environment.h", 163 "embedder_test_mock_delegate.h", 164 "embedder_test_timer_handling_delegate.h", 165 "fake_file_access.cpp", 166 "fake_file_access.h", 167 "range_set.cpp", 168 "range_set.h", 169 ] 170 deps = [ 171 "../:pdfium_public_headers", 172 "../core/fdrm", 173 "../core/fxcrt", 174 "../core/fxge", 175 "../third_party:pdfium_base", 176 "//testing/gmock", 177 "//testing/gtest", 178 ] 179 public_deps = [ 180 ":test_environments", 181 ":test_support", 182 ] 183 configs += [ 184 "../:pdfium_strict_config", 185 "../:pdfium_noshorten_config", 186 ] 187 visibility = [ "../*" ] 188 if (pdf_enable_v8) { 189 sources += [ 190 "external_engine_embedder_test.cpp", 191 "external_engine_embedder_test.h", 192 "js_embedder_test.cpp", 193 "js_embedder_test.h", 194 ] 195 deps += [ 196 "../fxjs", 197 "//v8", 198 "//v8:v8_libplatform", 199 ] 200 configs += [ "//v8:external_startup_data" ] 201 if (pdf_enable_xfa) { 202 sources += [ 203 "xfa_js_embedder_test.cpp", 204 "xfa_js_embedder_test.h", 205 ] 206 deps += [ 207 "../fpdfsdk", 208 "../fpdfsdk/fpdfxfa", 209 "../xfa/fxfa", 210 "../xfa/fxfa/parser", 211 ] 212 } 213 } 214} 215 216# Dummy group to keep satisfy references from //build. 217group("test_scripts_shared") { 218} 219