diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-15 23:49:48 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-15 23:49:48 +0000 |
commit | a996ff444d4bf57a78d59dde59b280ca0542962a (patch) | |
tree | 8bc65bb923cf3f2932a9598002db2652ab7a48b3 | |
parent | f03f7810c30cb3d01517c0efc189d68e440c9162 (diff) | |
download | pdfium-a996ff444d4bf57a78d59dde59b280ca0542962a.tar.xz |
Move fx_skia_device_unittest.cpp to pdfium_embeddertests.
It uses fpdfsdk/ and public/ code from core/.
Also sort some conditionals in BUILD.gn.
Change-Id: I4da9dc1f1833fa6644be3da1a935beba1d57cb2f
Reviewed-on: https://pdfium-review.googlesource.com/c/43996
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
-rw-r--r-- | BUILD.gn | 42 | ||||
-rw-r--r-- | core/fxge/skia/fx_skia_device_embeddertest.cpp (renamed from core/fxge/skia/fx_skia_device_unittest.cpp) | 2 |
2 files changed, 24 insertions, 20 deletions
@@ -251,6 +251,19 @@ test("pdfium_unittests") { "//testing/gtest", ] configs += [ ":pdfium_core_config" ] + + if (is_android) { + use_raw_android_executable = true + } + + if (pdf_enable_v8) { + configs += [ "//v8:external_startup_data" ] + deps += [ + "fxjs:unittests", + "//v8", + ] + } + if (pdf_enable_xfa) { deps += [ "fxbarcode:unittests", @@ -263,22 +276,6 @@ test("pdfium_unittests") { "xfa/fxfa/parser:unittests", ] } - - # TODO(thestig): Should this be an embeddertest? - if (pdf_use_skia || pdf_use_skia_paths) { - sources += [ "core/fxge/skia/fx_skia_device_unittest.cpp" ] - deps += [ "//skia" ] - } - if (pdf_enable_v8) { - configs += [ "//v8:external_startup_data" ] - deps += [ - "fxjs:unittests", - "//v8", - ] - } - if (is_android) { - use_raw_android_executable = true - } } test("pdfium_embeddertests") { @@ -335,6 +332,11 @@ test("pdfium_embeddertests") { include_dirs = [ "testing/gmock/include" ] configs += [ ":pdfium_core_config" ] + if (is_android) { + ignore_all_data_deps = true + use_raw_android_executable = true + } + if (pdf_enable_v8) { sources += [ "fxjs/cfxjs_engine_embeddertest.cpp", @@ -345,6 +347,7 @@ test("pdfium_embeddertests") { deps += [ "fxjs" ] configs += [ "//v8:external_startup_data" ] } + if (pdf_enable_xfa) { sources += [ "fxjs/cfxjse_formcalc_context_embeddertest.cpp", @@ -354,9 +357,10 @@ test("pdfium_embeddertests") { "xfa/fxfa/parser/cxfa_document_parser_embeddertest.cpp", ] } - if (is_android) { - ignore_all_data_deps = true - use_raw_android_executable = true + + if (pdf_use_skia || pdf_use_skia_paths) { + sources += [ "core/fxge/skia/fx_skia_device_embeddertest.cpp" ] + deps += [ "//skia" ] } } diff --git a/core/fxge/skia/fx_skia_device_unittest.cpp b/core/fxge/skia/fx_skia_device_embeddertest.cpp index dec1e7601a..3965a11c56 100644 --- a/core/fxge/skia/fx_skia_device_unittest.cpp +++ b/core/fxge/skia/fx_skia_device_embeddertest.cpp @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "core/fxge/skia/fx_skia_device.h" #include "core/fxge/cfx_defaultrenderdevice.h" #include "core/fxge/cfx_font.h" #include "core/fxge/cfx_graphstatedata.h" #include "core/fxge/cfx_pathdata.h" #include "core/fxge/cfx_renderdevice.h" +#include "core/fxge/skia/fx_skia_device.h" #include "fpdfsdk/cpdfsdk_helpers.h" #include "public/fpdfview.h" #include "testing/gtest/include/gtest/gtest.h" |