1# Copyright 2018 The PDFium 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 5import("../pdfium.gni") 6 7source_set("test_support") { 8 testonly = true 9 sources = [ 10 "fx_string_testhelpers.cpp", 11 "fx_string_testhelpers.h", 12 "invalid_seekable_read_stream.cpp", 13 "invalid_seekable_read_stream.h", 14 "pseudo_retainable.h", 15 "string_write_stream.cpp", 16 "string_write_stream.h", 17 "test_loader.cpp", 18 "test_loader.h", 19 "test_support.cpp", 20 "test_support.h", 21 "utils/bitmap_saver.cpp", 22 "utils/bitmap_saver.h", 23 "utils/file_util.cpp", 24 "utils/file_util.h", 25 "utils/hash.cpp", 26 "utils/hash.h", 27 "utils/path_service.cpp", 28 "utils/path_service.h", 29 ] 30 data = [ "resources/" ] 31 deps = [ 32 "../:pdfium_public_headers", 33 "../core/fdrm", 34 "../core/fxcrt", 35 "../core/fxge", 36 "image_diff", 37 ] 38 configs += [ "../:pdfium_core_config" ] 39 visibility = [ "../*" ] 40 41 if (pdf_enable_v8) { 42 sources += [ 43 "v8_initializer.cpp", 44 "v8_initializer.h", 45 ] 46 deps += [ 47 "//v8", 48 "//v8:v8_libplatform", 49 ] 50 configs += [ "//v8:external_startup_data" ] 51 } 52} 53 54source_set("unit_test_support") { 55 testonly = true 56 sources = [] 57 deps = [] 58 59 configs += [ "../:pdfium_core_config" ] 60 visibility = [ "../*" ] 61 62 if (pdf_enable_xfa) { 63 sources += [ 64 "xfa_unit_test_support.cpp", 65 "xfa_unit_test_support.h", 66 ] 67 deps += [ 68 "../:pdfium", 69 "../core/fxge", 70 "../xfa/fgas", 71 "//testing/gtest", 72 ] 73 } 74} 75 76source_set("embedder_test_support") { 77 testonly = true 78 sources = [ 79 "embedder_test.cpp", 80 "embedder_test.h", 81 "embedder_test_mock_delegate.h", 82 "embedder_test_timer_handling_delegate.h", 83 "fake_file_access.cpp", 84 "fake_file_access.h", 85 "range_set.cpp", 86 "range_set.h", 87 ] 88 89 deps = [ 90 ":test_support", 91 "../:pdfium_public_headers", 92 "../core/fdrm", 93 "../core/fxcrt", 94 "../third_party:pdfium_base", 95 "//testing/gmock", 96 "//testing/gtest", 97 ] 98 configs += [ "../:pdfium_core_config" ] 99 visibility = [ "../*" ] 100 101 if (pdf_enable_v8) { 102 sources += [ 103 "js_embedder_test.cpp", 104 "js_embedder_test.h", 105 ] 106 deps += [ "../fxjs" ] 107 108 if (pdf_enable_xfa) { 109 sources += [ 110 "xfa_js_embedder_test.cpp", 111 "xfa_js_embedder_test.h", 112 ] 113 deps += [ 114 "../fpdfsdk", 115 "../fpdfsdk/fpdfxfa", 116 "../xfa/fxfa", 117 "../xfa/fxfa/parser", 118 ] 119 } 120 } 121} 122