Adding fm2js embedder tests

This Cl adds the basis of the test framework to execute the javascript
produced by CXFA_FM2JSContext and verify the results are correct.

Change-Id: Ie46625b7e27ca0808e9cc41fdc00b7c0a212837d
Reviewed-on: https://pdfium-review.googlesource.com/5651
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 450a46c..53f4644 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1957,7 +1957,6 @@
     "testing/embedder_test.h",
     "testing/embedder_test_mock_delegate.h",
     "testing/embedder_test_timer_handling_delegate.h",
-    "xfa/fxfa/parser/cxfa_simple_parser_embeddertest.cpp",
   ]
   deps = [
     ":pdfium",
@@ -1978,6 +1977,14 @@
     deps += [ ":fxjs" ]
     configs += [ "//v8:external_startup_data" ]
   }
+  if (pdf_enable_xfa) {
+    sources += [
+      "testing/xfa_js_embedder_test.cpp",
+      "testing/xfa_js_embedder_test.h",
+      "xfa/fxfa/fm2js/cxfa_fm2jscontext_embeddertest.cpp",
+      "xfa/fxfa/parser/cxfa_simple_parser_embeddertest.cpp",
+    ]
+  }
   if (is_android) {
     ignore_all_data_deps = true
     use_raw_android_executable = true