diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-15 23:51:28 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-15 23:51:28 +0000 |
commit | 1929d6e1d44ed9bd692c930d5cf79fb2bd80f1e6 (patch) | |
tree | eb99fda121d93741b79d65cf22bf90100093d90a /testing | |
parent | a996ff444d4bf57a78d59dde59b280ca0542962a (diff) | |
download | pdfium-1929d6e1d44ed9bd692c930d5cf79fb2bd80f1e6.tar.xz |
Split pdfium_embeddertests sources.chromium/3582
Move foo_embeddertest.cpp to the same BUILD.gn file as foo.cpp.
Set up dependencies to make pdfium_embeddertests pass gn check.
Change-Id: If1fe67c261960c35c344c1047950cd7fdb32c4a1
Reviewed-on: https://pdfium-review.googlesource.com/c/43997
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'testing')
-rw-r--r-- | testing/BUILD.gn | 45 | ||||
-rw-r--r-- | testing/test.gni | 21 |
2 files changed, 66 insertions, 0 deletions
diff --git a/testing/BUILD.gn b/testing/BUILD.gn index c231e2207f..8494fc38ef 100644 --- a/testing/BUILD.gn +++ b/testing/BUILD.gn @@ -41,3 +41,48 @@ jumbo_source_set("test_support") { 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", + ] + } +} diff --git a/testing/test.gni b/testing/test.gni index 0bfac4666c..9b72dc8ac0 100644 --- a/testing/test.gni +++ b/testing/test.gni @@ -284,3 +284,24 @@ template("pdfium_unittest_source_set") { forward_variables_from(invoker, [ "cflags" ]) } } + +template("pdfium_embeddertest_source_set") { + source_set(target_name) { + _pdfium_root_dir = rebase_path(invoker.pdfium_root_dir, ".") + + testonly = true + sources = invoker.sources + configs += [ _pdfium_root_dir + ":pdfium_core_config" ] + if (defined(invoker.configs)) { + configs += invoker.configs + } + deps = [ + _pdfium_root_dir + ":pdfium_embeddertest_deps", + ] + if (defined(invoker.deps)) { + deps += invoker.deps + } + visibility = [ _pdfium_root_dir + ":*" ] + forward_variables_from(invoker, [ "cflags" ]) + } +} |