blob: 215a8edc108a746e896408e7c6cd83e1969bf2c8 [file] [log] [blame]
# 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("../pdfium.gni")
source_set("test_support") {
testonly = true
sources = [
"fx_string_testhelpers.cpp",
"fx_string_testhelpers.h",
"invalid_seekable_read_stream.cpp",
"invalid_seekable_read_stream.h",
"pseudo_retainable.h",
"string_write_stream.cpp",
"string_write_stream.h",
"test_loader.cpp",
"test_loader.h",
"test_support.h",
"utils/bitmap_saver.cpp",
"utils/bitmap_saver.h",
"utils/file_util.cpp",
"utils/file_util.h",
"utils/hash.cpp",
"utils/hash.h",
]
data = [ "resources/" ]
public_deps = [ ":path_service" ]
deps = [
"../:pdfium_public_headers",
"../core/fdrm",
"../core/fxcrt",
"../core/fxge",
"image_diff",
]
configs += [ "../:pdfium_core_config" ]
visibility = [ "../*" ]
if (pdf_enable_v8) {
sources += [
"v8_initializer.cpp",
"v8_initializer.h",
]
deps += [
"//v8",
"//v8:v8_libplatform",
]
configs += [ "//v8:external_startup_data" ]
}
}
source_set("path_service") {
testonly = true
sources = [
"utils/path_service.cpp",
"utils/path_service.h",
]
deps = [ "../core/fxcrt" ]
configs += [ "../:pdfium_core_config" ]
visibility = [ "../*" ]
}
source_set("test_environments") {
testonly = true
sources = [
"pdf_test_environment.cpp",
"pdf_test_environment.h",
]
deps = [
":test_support",
"../core/fxcrt",
"../core/fxge",
"//testing/gtest",
]
configs += [ "../:pdfium_core_config" ]
if (pdf_enable_v8) {
sources += [
"v8_test_environment.cpp",
"v8_test_environment.h",
]
deps += [
"../fxjs",
"//v8",
"//v8:v8_libplatform",
]
configs += [ "//v8:external_startup_data" ]
}
if (pdf_enable_xfa) {
sources += [
"xfa_test_environment.cpp",
"xfa_test_environment.h",
]
deps += [
"../xfa/fgas",
"//v8:cppgc",
]
}
}
source_set("unit_test_support") {
testonly = true
sources = []
deps = []
configs += [ "../:pdfium_core_config" ]
public_deps = [
":test_environments",
":test_support",
]
if (pdf_enable_v8) {
sources += [
"fxv8_unittest.cpp",
"fxv8_unittest.h",
]
deps += [
"../fxjs",
"//testing/gtest",
]
configs += [ "//v8:external_startup_data" ]
if (pdf_enable_xfa) {
sources += [
"fxgc_unittest.cpp",
"fxgc_unittest.h",
]
}
}
}
source_set("embedder_test_support") {
testonly = true
sources = [
"embedder_test.cpp",
"embedder_test.h",
"embedder_test_constants.cpp",
"embedder_test_constants.h",
"embedder_test_environment.cpp",
"embedder_test_environment.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 = [
"../:pdfium_public_headers",
"../core/fdrm",
"../core/fxcrt",
"../third_party:pdfium_base",
"//testing/gmock",
"//testing/gtest",
]
public_deps = [
":test_environments",
":test_support",
]
configs += [ "../:pdfium_core_config" ]
visibility = [ "../*" ]
if (pdf_enable_v8) {
sources += [
"external_engine_embedder_test.cpp",
"external_engine_embedder_test.h",
"js_embedder_test.cpp",
"js_embedder_test.h",
]
deps += [
"../fxjs",
"//v8",
"//v8:v8_libplatform",
]
configs += [ "//v8:external_startup_data" ]
if (pdf_enable_xfa) {
sources += [
"xfa_js_embedder_test.cpp",
"xfa_js_embedder_test.h",
]
deps += [
"../fpdfsdk",
"../fpdfsdk/fpdfxfa",
"../xfa/fxfa",
"../xfa/fxfa/parser",
]
}
}
}