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") 6import("../testing/test.gni") 7 8source_set("fxjs") { 9 sources = [ 10 "cjs_event_context_stub.cpp", 11 "cjs_event_context_stub.h", 12 "cjs_runtimestub.cpp", 13 "cjs_runtimestub.h", 14 "ijs_event_context.h", 15 "ijs_runtime.cpp", 16 "ijs_runtime.h", 17 ] 18 configs += [ "../:pdfium_core_config" ] 19 deps = [ "../core/fxcrt" ] 20 visibility = [ "../*" ] 21 22 if (pdf_enable_v8) { 23 sources += [ 24 "cfx_globaldata.cpp", 25 "cfx_globaldata.h", 26 "cfx_keyvalue.cpp", 27 "cfx_keyvalue.h", 28 "cfx_v8.cpp", 29 "cfx_v8.h", 30 "cfxjs_engine.cpp", 31 "cfxjs_engine.h", 32 "cjs_annot.cpp", 33 "cjs_annot.h", 34 "cjs_app.cpp", 35 "cjs_app.h", 36 "cjs_border.cpp", 37 "cjs_border.h", 38 "cjs_color.cpp", 39 "cjs_color.h", 40 "cjs_console.cpp", 41 "cjs_console.h", 42 "cjs_delaydata.cpp", 43 "cjs_delaydata.h", 44 "cjs_display.cpp", 45 "cjs_display.h", 46 "cjs_document.cpp", 47 "cjs_document.h", 48 "cjs_event.cpp", 49 "cjs_event.h", 50 "cjs_event_context.cpp", 51 "cjs_event_context.h", 52 "cjs_eventrecorder.cpp", 53 "cjs_eventrecorder.h", 54 "cjs_field.cpp", 55 "cjs_field.h", 56 "cjs_font.cpp", 57 "cjs_font.h", 58 "cjs_global.cpp", 59 "cjs_global.h", 60 "cjs_globalarrays.cpp", 61 "cjs_globalarrays.h", 62 "cjs_globalconsts.cpp", 63 "cjs_globalconsts.h", 64 "cjs_highlight.cpp", 65 "cjs_highlight.h", 66 "cjs_icon.cpp", 67 "cjs_icon.h", 68 "cjs_object.cpp", 69 "cjs_object.h", 70 "cjs_position.cpp", 71 "cjs_position.h", 72 "cjs_publicmethods.cpp", 73 "cjs_publicmethods.h", 74 "cjs_result.cpp", 75 "cjs_result.h", 76 "cjs_runtime.cpp", 77 "cjs_runtime.h", 78 "cjs_scalehow.cpp", 79 "cjs_scalehow.h", 80 "cjs_scalewhen.cpp", 81 "cjs_scalewhen.h", 82 "cjs_style.cpp", 83 "cjs_style.h", 84 "cjs_timerobj.cpp", 85 "cjs_timerobj.h", 86 "cjs_util.cpp", 87 "cjs_util.h", 88 "cjs_zoomtype.cpp", 89 "cjs_zoomtype.h", 90 "fx_date_helpers.cpp", 91 "fx_date_helpers.h", 92 "global_timer.cpp", 93 "global_timer.h", 94 "js_define.cpp", 95 "js_define.h", 96 "js_resources.cpp", 97 "js_resources.h", 98 ] 99 deps += [ 100 "../constants", 101 "../core/fdrm", 102 "../core/fpdfapi/page", 103 "../core/fpdfapi/parser", 104 "../core/fpdfapi/render", 105 "../core/fpdfdoc", 106 "../core/fxge", 107 "//v8", 108 "//v8:v8_libplatform", 109 ] 110 configs += [ "//v8:external_startup_data" ] 111 public_deps = [ "//v8" ] 112 113 if (pdf_enable_xfa) { 114 sources += [ 115 "xfa/cfxjse_arguments.cpp", 116 "xfa/cfxjse_arguments.h", 117 "xfa/cfxjse_class.cpp", 118 "xfa/cfxjse_class.h", 119 "xfa/cfxjse_context.cpp", 120 "xfa/cfxjse_context.h", 121 "xfa/cfxjse_engine.cpp", 122 "xfa/cfxjse_engine.h", 123 "xfa/cfxjse_formcalc_context.cpp", 124 "xfa/cfxjse_formcalc_context.h", 125 "xfa/cfxjse_isolatetracker.cpp", 126 "xfa/cfxjse_isolatetracker.h", 127 "xfa/cfxjse_resolveprocessor.cpp", 128 "xfa/cfxjse_resolveprocessor.h", 129 "xfa/cfxjse_runtimedata.cpp", 130 "xfa/cfxjse_runtimedata.h", 131 "xfa/cfxjse_value.cpp", 132 "xfa/cfxjse_value.h", 133 "xfa/cjx_boolean.cpp", 134 "xfa/cjx_boolean.h", 135 "xfa/cjx_container.cpp", 136 "xfa/cjx_container.h", 137 "xfa/cjx_datawindow.cpp", 138 "xfa/cjx_datawindow.h", 139 "xfa/cjx_delta.cpp", 140 "xfa/cjx_delta.h", 141 "xfa/cjx_desc.cpp", 142 "xfa/cjx_desc.h", 143 "xfa/cjx_draw.cpp", 144 "xfa/cjx_draw.h", 145 "xfa/cjx_encrypt.cpp", 146 "xfa/cjx_encrypt.h", 147 "xfa/cjx_eventpseudomodel.cpp", 148 "xfa/cjx_eventpseudomodel.h", 149 "xfa/cjx_exclgroup.cpp", 150 "xfa/cjx_exclgroup.h", 151 "xfa/cjx_extras.cpp", 152 "xfa/cjx_extras.h", 153 "xfa/cjx_field.cpp", 154 "xfa/cjx_field.h", 155 "xfa/cjx_form.cpp", 156 "xfa/cjx_form.h", 157 "xfa/cjx_handler.cpp", 158 "xfa/cjx_handler.h", 159 "xfa/cjx_hostpseudomodel.cpp", 160 "xfa/cjx_hostpseudomodel.h", 161 "xfa/cjx_instancemanager.cpp", 162 "xfa/cjx_instancemanager.h", 163 "xfa/cjx_layoutpseudomodel.cpp", 164 "xfa/cjx_layoutpseudomodel.h", 165 "xfa/cjx_list.cpp", 166 "xfa/cjx_list.h", 167 "xfa/cjx_logpseudomodel.cpp", 168 "xfa/cjx_logpseudomodel.h", 169 "xfa/cjx_manifest.cpp", 170 "xfa/cjx_manifest.h", 171 "xfa/cjx_model.cpp", 172 "xfa/cjx_model.h", 173 "xfa/cjx_node.cpp", 174 "xfa/cjx_node.h", 175 "xfa/cjx_object.cpp", 176 "xfa/cjx_object.h", 177 "xfa/cjx_occur.cpp", 178 "xfa/cjx_occur.h", 179 "xfa/cjx_packet.cpp", 180 "xfa/cjx_packet.h", 181 "xfa/cjx_script.cpp", 182 "xfa/cjx_script.h", 183 "xfa/cjx_signaturepseudomodel.cpp", 184 "xfa/cjx_signaturepseudomodel.h", 185 "xfa/cjx_source.cpp", 186 "xfa/cjx_source.h", 187 "xfa/cjx_subform.cpp", 188 "xfa/cjx_subform.h", 189 "xfa/cjx_template.cpp", 190 "xfa/cjx_template.h", 191 "xfa/cjx_textnode.cpp", 192 "xfa/cjx_textnode.h", 193 "xfa/cjx_tree.cpp", 194 "xfa/cjx_tree.h", 195 "xfa/cjx_treelist.cpp", 196 "xfa/cjx_treelist.h", 197 "xfa/cjx_wsdlconnection.cpp", 198 "xfa/cjx_wsdlconnection.h", 199 "xfa/cjx_xfa.cpp", 200 "xfa/cjx_xfa.h", 201 "xfa/fxjse.cpp", 202 "xfa/fxjse.h", 203 "xfa/jse_define.h", 204 ] 205 deps += [ 206 "../xfa/fgas", 207 "../xfa/fxfa/fm2js", 208 ] 209 } 210 } 211} 212 213if (pdf_enable_v8) { 214 pdfium_unittest_source_set("unittests") { 215 sources = [ 216 "cfx_globaldata_unittest.cpp", 217 "cfx_v8_unittest.cpp", 218 "cfx_v8_unittest.h", 219 "cfxjs_engine_unittest.cpp", 220 "cjs_publicmethods_unittest.cpp", 221 "cjs_util_unittest.cpp", 222 "fx_date_helpers_unittest.cpp", 223 ] 224 configs = [ "//v8:external_startup_data" ] 225 deps = [ ":fxjs" ] 226 pdfium_root_dir = "../" 227 } 228 229 pdfium_embeddertest_source_set("embeddertests") { 230 sources = [ 231 "cfxjs_engine_embeddertest.cpp", 232 "cjs_publicmethods_embeddertest.cpp", 233 ] 234 configs = [ "//v8:external_startup_data" ] 235 deps = [ 236 ":fxjs", 237 "../fpdfsdk", 238 ] 239 pdfium_root_dir = "../" 240 241 if (pdf_enable_xfa) { 242 sources += [ 243 "xfa/cfxjse_app_embeddertest.cpp", 244 "xfa/cfxjse_formcalc_context_embeddertest.cpp", 245 "xfa/cfxjse_value_embeddertest.cpp", 246 "xfa/cjx_hostpseudomodel_embeddertest.cpp", 247 "xfa/cjx_list_embeddertest.cpp", 248 ] 249 deps += [ "../xfa/fxfa" ] 250 } 251 } 252} 253