Move CSS unit tests build to core/fxcrt/css/BUILD.gn.

Top-level fxcrt BUILD.gn shouldn't have to deal with this.

Change-Id: Icea1209bafe33c6f8f3481bfe6f077f6a9926847
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/66530
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 62f09e5..9d31dc6 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -259,6 +259,7 @@
 
   if (pdf_enable_xfa) {
     deps += [
+      "core/fxcrt/css:unittests",
       "fxbarcode:unittests",
       "xfa/fde:unittests",
       "xfa/fgas:unittests",
diff --git a/core/fxcrt/BUILD.gn b/core/fxcrt/BUILD.gn
index 9a2c710..b3ea3e1 100644
--- a/core/fxcrt/BUILD.gn
+++ b/core/fxcrt/BUILD.gn
@@ -170,16 +170,7 @@
   pdfium_root_dir = "../../"
 
   if (pdf_enable_xfa) {
-    sources += [
-      "cfx_memorystream_unittest.cpp",
-      "css/cfx_cssdeclaration_unittest.cpp",
-      "css/cfx_cssstylesheet_unittest.cpp",
-      "css/cfx_csssyntaxparser_unittest.cpp",
-      "css/cfx_cssvaluelistparser_unittest.cpp",
-    ]
-    deps += [
-      "../fpdfapi/parser",
-      "css",
-    ]
+    sources += [ "cfx_memorystream_unittest.cpp" ]
+    deps += [ "../fpdfapi/parser" ]
   }
 }
diff --git a/core/fxcrt/css/BUILD.gn b/core/fxcrt/css/BUILD.gn
index 66090c1..34dd54d 100644
--- a/core/fxcrt/css/BUILD.gn
+++ b/core/fxcrt/css/BUILD.gn
@@ -3,6 +3,7 @@
 # found in the LICENSE file.
 
 import("../../../pdfium.gni")
+import("../../../testing/test.gni")
 
 assert(pdf_enable_xfa)
 
@@ -57,3 +58,14 @@
   configs += [ "../../../:pdfium_core_config" ]
   visibility = [ "../../../*" ]
 }
+
+pdfium_unittest_source_set("unittests") {
+  sources = [
+    "cfx_cssdeclaration_unittest.cpp",
+    "cfx_cssstylesheet_unittest.cpp",
+    "cfx_csssyntaxparser_unittest.cpp",
+    "cfx_cssvaluelistparser_unittest.cpp",
+  ]
+  pdfium_root_dir = "../../../"
+  deps = [ ":css" ]
+}