Make testing/ pass gn check.

Change-Id: Ifb2d60bf3c2d86a105705196d65e318081cefe4e
Reviewed-on: https://pdfium-review.googlesource.com/c/43981
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/.gn b/.gn
index 2c77331..e9335c5 100644
--- a/.gn
+++ b/.gn
@@ -20,12 +20,13 @@
   "//core/fxcrt/*",
   "//fxbarcode/*",
   "//samples/*",
+  "//testing/:*",
+  "//testing/fuzzers/*",
+  "//testing/image_diff/*",
 
   # TODO(thestig): Work on these.
   #"//core/*",
   #"//fpdfsdk/*",
   #"//fxjs/*",
-  #"//testing/*",
-  #"//testing/fuzzers/*",
   #"//xfa/*",
 ]
diff --git a/testing/BUILD.gn b/testing/BUILD.gn
index 286921d..0dd6a82 100644
--- a/testing/BUILD.gn
+++ b/testing/BUILD.gn
@@ -24,6 +24,7 @@
   ]
   deps = [
     "../:pdfium",
+    "../core/fdrm",
     "image_diff",
     "//testing/gmock",
     "//testing/gtest",
diff --git a/testing/fuzzers/BUILD.gn b/testing/fuzzers/BUILD.gn
index c4c62f7..df4cac0 100644
--- a/testing/fuzzers/BUILD.gn
+++ b/testing/fuzzers/BUILD.gn
@@ -121,12 +121,18 @@
     sources = [
       "pdf_bidi_fuzzer.cc",
     ]
+    deps = [
+      "../../xfa/fgas",
+    ]
   }
 
   pdfium_fuzzer("pdf_cfx_barcode_fuzzer_src") {
     sources = [
       "pdf_cfx_barcode_fuzzer.cc",
     ]
+    deps = [
+      "../../xfa/fwl",
+    ]
   }
 
   if (pdf_enable_xfa_bmp) {
@@ -137,6 +143,8 @@
       ]
       deps = [
         "../:test_support",
+        "../../core/fxcodec",
+        "../../core/fxge",
       ]
     }
   }
@@ -149,6 +157,8 @@
       ]
       deps = [
         "../:test_support",
+        "../../core/fxcodec",
+        "../../core/fxge",
       ]
     }
 
@@ -156,6 +166,9 @@
       sources = [
         "pdf_lzw_fuzzer.cc",
       ]
+      deps = [
+        "../../core/fxcodec",
+      ]
     }
   }
 
@@ -166,6 +179,8 @@
     ]
     deps = [
       "../:test_support",
+      "../../core/fxcodec",
+      "../../core/fxge",
     ]
   }
 
@@ -177,6 +192,8 @@
       ]
       deps = [
         "../:test_support",
+        "../../core/fxcodec",
+        "../../core/fxge",
       ]
     }
   }
@@ -189,6 +206,8 @@
       ]
       deps = [
         "../:test_support",
+        "../../core/fxcodec",
+        "../../core/fxge",
       ]
     }
   }
@@ -197,18 +216,27 @@
     sources = [
       "pdf_css_fuzzer.cc",
     ]
+    deps = [
+      "../../core/fxcrt/css",
+    ]
   }
 
   pdfium_fuzzer("pdf_fm2js_fuzzer_src") {
     sources = [
       "pdf_fm2js_fuzzer.cc",
     ]
+    deps = [
+      "../../fxjs",
+    ]
   }
 
   pdfium_fuzzer("pdf_formcalc_fuzzer_src") {
     sources = [
       "pdf_formcalc_fuzzer.cc",
     ]
+    deps = [
+      "../../xfa/fxfa/fm2js",
+    ]
   }
 
   pdfium_public_fuzzer("pdfium_xfa_fuzzer_src") {
@@ -222,39 +250,57 @@
   sources = [
     "pdf_cmap_fuzzer.cc",
   ]
+  deps = [
+    "../../core/fpdfapi/font",
+  ]
 }
 
 pdfium_fuzzer("pdf_codec_a85_fuzzer_src") {
   sources = [
     "pdf_codec_a85_fuzzer.cc",
   ]
+  deps = [
+    "../../core/fxcodec",
+  ]
 }
 
 pdfium_fuzzer("pdf_codec_fax_fuzzer_src") {
   sources = [
     "pdf_codec_fax_fuzzer.cc",
   ]
+  deps = [
+    "../../core/fxcodec",
+  ]
 }
 
 pdfium_fuzzer("pdf_codec_icc_fuzzer_src") {
-  deps = [
-    "../../third_party/:lcms2",
-  ]
   sources = [
     "pdf_codec_icc_fuzzer.cc",
   ]
+  deps = [
+    "../../core/fxcodec",
+    "../../third_party/:lcms2",
+  ]
 }
 
 pdfium_fuzzer("pdf_codec_jbig2_fuzzer_src") {
   sources = [
     "pdf_codec_jbig2_fuzzer.cc",
   ]
+  deps = [
+    "../../core/fpdfapi/parser",
+    "../../core/fxcodec",
+    "../../core/fxge",
+  ]
 }
 
 pdfium_fuzzer("pdf_codec_rle_fuzzer_src") {
   sources = [
     "pdf_codec_rle_fuzzer.cc",
   ]
+  deps = [
+    "../../core/fxcodec",
+  ]
 }
 
 pdfium_fuzzer("pdf_font_fuzzer_src") {
@@ -267,24 +313,38 @@
   sources = [
     "pdf_hint_table_fuzzer.cc",
   ]
+  deps = [
+    "../../core/fpdfapi/parser",
+  ]
 }
 
 pdfium_fuzzer("pdf_jpx_fuzzer_src") {
   sources = [
     "pdf_jpx_fuzzer.cc",
   ]
+  deps = [
+    "../../core/fxcodec",
+    "../../core/fxge",
+  ]
 }
 
 pdfium_fuzzer("pdf_psengine_fuzzer_src") {
   sources = [
     "pdf_psengine_fuzzer.cc",
   ]
+  deps = [
+    "../../core/fpdfapi/page",
+  ]
 }
 
 pdfium_fuzzer("pdf_streamparser_fuzzer_src") {
   sources = [
     "pdf_streamparser_fuzzer.cc",
   ]
+  deps = [
+    "../../core/fpdfapi/page",
+    "../../core/fpdfapi/parser",
+  ]
 }
 
 pdfium_fuzzer("pdf_xml_fuzzer_src") {
diff --git a/testing/image_diff/BUILD.gn b/testing/image_diff/BUILD.gn
index 39261ba..35c0d57 100644
--- a/testing/image_diff/BUILD.gn
+++ b/testing/image_diff/BUILD.gn
@@ -13,6 +13,8 @@
   ]
   configs += [ "../../:pdfium_core_config" ]
   deps = [
+    "../../third_party:pdfium_base",
     "../../third_party:png",
+    "//third_party/zlib",
   ]
 }