1# Copyright 2018 The PDFium Authors 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_strict_config" ] 19 deps = [ "../core/fxcrt" ] 20 public_deps = [] 21 visibility = [ "../*" ] 22 23 if (pdf_enable_v8) { 24 sources += [ 25 "cfx_globaldata.cpp", 26 "cfx_globaldata.h", 27 "cfx_keyvalue.cpp", 28 "cfx_keyvalue.h", 29 "cfx_v8.cpp", 30 "cfx_v8.h", 31 "cfx_v8_array_buffer_allocator.cpp", 32 "cfx_v8_array_buffer_allocator.h", 33 "cfxjs_engine.cpp", 34 "cfxjs_engine.h", 35 "cjs_annot.cpp", 36 "cjs_annot.h", 37 "cjs_app.cpp", 38 "cjs_app.h", 39 "cjs_border.cpp", 40 "cjs_border.h", 41 "cjs_color.cpp", 42 "cjs_color.h", 43 "cjs_console.cpp", 44 "cjs_console.h", 45 "cjs_delaydata.cpp", 46 "cjs_delaydata.h", 47 "cjs_display.cpp", 48 "cjs_display.h", 49 "cjs_document.cpp", 50 "cjs_document.h", 51 "cjs_event.cpp", 52 "cjs_event.h", 53 "cjs_event_context.cpp", 54 "cjs_event_context.h", 55 "cjs_field.cpp", 56 "cjs_field.h", 57 "cjs_font.cpp", 58 "cjs_font.h", 59 "cjs_global.cpp", 60 "cjs_global.h", 61 "cjs_globalarrays.cpp", 62 "cjs_globalarrays.h", 63 "cjs_globalconsts.cpp", 64 "cjs_globalconsts.h", 65 "cjs_highlight.cpp", 66 "cjs_highlight.h", 67 "cjs_icon.cpp", 68 "cjs_icon.h", 69 "cjs_object.cpp", 70 "cjs_object.h", 71 "cjs_position.cpp", 72 "cjs_position.h", 73 "cjs_publicmethods.cpp", 74 "cjs_publicmethods.h", 75 "cjs_result.cpp", 76 "cjs_result.h", 77 "cjs_runtime.cpp", 78 "cjs_runtime.h", 79 "cjs_scalehow.cpp", 80 "cjs_scalehow.h", 81 "cjs_scalewhen.cpp", 82 "cjs_scalewhen.h", 83 "cjs_style.cpp", 84 "cjs_style.h", 85 "cjs_timerobj.cpp", 86 "cjs_timerobj.h", 87 "cjs_util.cpp", 88 "cjs_util.h", 89 "cjs_zoomtype.cpp", 90 "cjs_zoomtype.h", 91 "fx_date_helpers.cpp", 92 "fx_date_helpers.h", 93 "fxv8.cpp", 94 "fxv8.h", 95 "global_timer.cpp", 96 "global_timer.h", 97 "js_define.cpp", 98 "js_define.h", 99 "js_resources.cpp", 100 "js_resources.h", 101 ] 102 deps += [ 103 "../constants", 104 "../core/fdrm", 105 "../core/fpdfapi/page", 106 "../core/fpdfapi/parser", 107 "../core/fpdfapi/render", 108 "../core/fpdfdoc", 109 "../core/fxge", 110 "//v8", 111 "//v8:v8_libplatform", 112 ] 113 configs += [ "//v8:external_startup_data" ] 114 public_deps += [ 115 "../core/fxcrt", 116 "//v8", 117 ] 118 119 if (pdf_enable_xfa) { 120 sources += [ 121 "xfa/cfxjse_class.cpp", 122 "xfa/cfxjse_class.h", 123 "xfa/cfxjse_context.cpp", 124 "xfa/cfxjse_context.h", 125 "xfa/cfxjse_engine.cpp", 126 "xfa/cfxjse_engine.h", 127 "xfa/cfxjse_formcalc_context.cpp", 128 "xfa/cfxjse_formcalc_context.h", 129 "xfa/cfxjse_isolatetracker.cpp", 130 "xfa/cfxjse_isolatetracker.h", 131 "xfa/cfxjse_mapmodule.cpp", 132 "xfa/cfxjse_mapmodule.h", 133 "xfa/cfxjse_nodehelper.cpp", 134 "xfa/cfxjse_nodehelper.h", 135 "xfa/cfxjse_resolveprocessor.cpp", 136 "xfa/cfxjse_resolveprocessor.h", 137 "xfa/cfxjse_runtimedata.cpp", 138 "xfa/cfxjse_runtimedata.h", 139 "xfa/cfxjse_value.cpp", 140 "xfa/cfxjse_value.h", 141 "xfa/cjx_boolean.cpp", 142 "xfa/cjx_boolean.h", 143 "xfa/cjx_container.cpp", 144 "xfa/cjx_container.h", 145 "xfa/cjx_datawindow.cpp", 146 "xfa/cjx_datawindow.h", 147 "xfa/cjx_delta.cpp", 148 "xfa/cjx_delta.h", 149 "xfa/cjx_desc.cpp", 150 "xfa/cjx_desc.h", 151 "xfa/cjx_draw.cpp", 152 "xfa/cjx_draw.h", 153 "xfa/cjx_encrypt.cpp", 154 "xfa/cjx_encrypt.h", 155 "xfa/cjx_eventpseudomodel.cpp", 156 "xfa/cjx_eventpseudomodel.h", 157 "xfa/cjx_exclgroup.cpp", 158 "xfa/cjx_exclgroup.h", 159 "xfa/cjx_extras.cpp", 160 "xfa/cjx_extras.h", 161 "xfa/cjx_field.cpp", 162 "xfa/cjx_field.h", 163 "xfa/cjx_form.cpp", 164 "xfa/cjx_form.h", 165 "xfa/cjx_handler.cpp", 166 "xfa/cjx_handler.h", 167 "xfa/cjx_hostpseudomodel.cpp", 168 "xfa/cjx_hostpseudomodel.h", 169 "xfa/cjx_instancemanager.cpp", 170 "xfa/cjx_instancemanager.h", 171 "xfa/cjx_layoutpseudomodel.cpp", 172 "xfa/cjx_layoutpseudomodel.h", 173 "xfa/cjx_list.cpp", 174 "xfa/cjx_list.h", 175 "xfa/cjx_logpseudomodel.cpp", 176 "xfa/cjx_logpseudomodel.h", 177 "xfa/cjx_manifest.cpp", 178 "xfa/cjx_manifest.h", 179 "xfa/cjx_model.cpp", 180 "xfa/cjx_model.h", 181 "xfa/cjx_node.cpp", 182 "xfa/cjx_node.h", 183 "xfa/cjx_object.cpp", 184 "xfa/cjx_object.h", 185 "xfa/cjx_occur.cpp", 186 "xfa/cjx_occur.h", 187 "xfa/cjx_packet.cpp", 188 "xfa/cjx_packet.h", 189 "xfa/cjx_script.cpp", 190 "xfa/cjx_script.h", 191 "xfa/cjx_signaturepseudomodel.cpp", 192 "xfa/cjx_signaturepseudomodel.h", 193 "xfa/cjx_source.cpp", 194 "xfa/cjx_source.h", 195 "xfa/cjx_subform.cpp", 196 "xfa/cjx_subform.h", 197 "xfa/cjx_template.cpp", 198 "xfa/cjx_template.h", 199 "xfa/cjx_textnode.cpp", 200 "xfa/cjx_textnode.h", 201 "xfa/cjx_tree.cpp", 202 "xfa/cjx_tree.h", 203 "xfa/cjx_treelist.cpp", 204 "xfa/cjx_treelist.h", 205 "xfa/cjx_wsdlconnection.cpp", 206 "xfa/cjx_wsdlconnection.h", 207 "xfa/cjx_xfa.cpp", 208 "xfa/cjx_xfa.h", 209 "xfa/fxjse.cpp", 210 "xfa/fxjse.h", 211 "xfa/jse_define.h", 212 ] 213 deps += [ 214 ":gc", 215 "../xfa/fgas/crt", 216 "../xfa/fxfa/formcalc", 217 ] 218 } 219 } 220} 221 222if (pdf_enable_v8) { 223 if (pdf_enable_xfa) { 224 source_set("gc") { 225 sources = [ 226 "gc/container_trace.h", 227 "gc/gced_tree_node.h", 228 "gc/gced_tree_node_mixin.h", 229 "gc/heap.cpp", 230 "gc/heap.h", 231 ] 232 configs += [ "../:pdfium_strict_config" ] 233 deps = [ 234 "../core/fxcrt", 235 "//v8:v8_libplatform", 236 ] 237 public_deps = [ "//v8:cppgc" ] 238 } 239 } 240} 241 242if (pdf_enable_v8) { 243 pdfium_unittest_source_set("unittests") { 244 sources = [ 245 "cfx_globaldata_unittest.cpp", 246 "cfx_v8_unittest.cpp", 247 "cfxjs_engine_unittest.cpp", 248 "cjs_publicmethods_unittest.cpp", 249 "cjs_util_unittest.cpp", 250 "fx_date_helpers_unittest.cpp", 251 ] 252 configs = [ "//v8:external_startup_data" ] 253 deps = [ 254 ":fxjs", 255 "../core/fxcrt:unit_test_support", 256 ] 257 pdfium_root_dir = "../" 258 if (pdf_enable_xfa) { 259 sources += [ 260 "gc/container_trace_unittest.cpp", 261 "gc/gced_tree_node_mixin_unittest.cpp", 262 "gc/gced_tree_node_unittest.cpp", 263 "gc/heap_unittest.cpp", 264 "gc/move_unittest.cpp", 265 "xfa/cfxjse_formcalc_context_unittest.cpp", 266 "xfa/cfxjse_mapmodule_unittest.cpp", 267 ] 268 deps += [ 269 ":gc", 270 "../xfa/fxfa/parser", 271 ] 272 } 273 } 274 275 pdfium_embeddertest_source_set("embeddertests") { 276 sources = [ 277 "cfxjs_engine_embeddertest.cpp", 278 "cjs_publicmethods_embeddertest.cpp", 279 ] 280 configs = [ "//v8:external_startup_data" ] 281 deps = [ 282 ":fxjs", 283 "../fpdfsdk", 284 ] 285 pdfium_root_dir = "../" 286 if (pdf_enable_xfa) { 287 sources += [ 288 "xfa/cfxjse_app_embeddertest.cpp", 289 "xfa/cfxjse_formcalc_context_embeddertest.cpp", 290 "xfa/cfxjse_value_embeddertest.cpp", 291 "xfa/cjx_hostpseudomodel_embeddertest.cpp", 292 "xfa/cjx_list_embeddertest.cpp", 293 "xfa/cjx_object_embeddertest.cpp", 294 ] 295 deps += [ 296 ":gc", 297 "../xfa/fxfa", 298 ] 299 } 300 } 301} 302