Switch to absl single target when building with Chromium.

The //third_party/abseil-cpp:absl target is currently a group that
depends on all the targets needed by WebRTC in Chromium.

It will be switched to a component starting from
https://chromium-review.googlesource.com/c/chromium/src/+/2174434.

Bug: chromium:1046390
Change-Id: I70d450fdbfa895084b481c9884b6361d2fb9580d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176901
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31498}
diff --git a/test/BUILD.gn b/test/BUILD.gn
index 793ca4f..974848b 100644
--- a/test/BUILD.gn
+++ b/test/BUILD.gn
@@ -22,13 +22,13 @@
     ":test_renderer",
     ":test_support",
     ":video_test_common",
-    "pc/e2e",
   ]
 
   if (rtc_include_tests) {
     deps += [
       ":test_main",
       ":test_support_unittests",
+      "pc/e2e",
     ]
   }
 }
@@ -234,10 +234,7 @@
     "../rtc_base:logging",
     "../rtc_base:rtc_numerics",
   ]
-  absl_deps = [
-    "//third_party/abseil-cpp/absl/flags:flag",
-    "//third_party/abseil-cpp/absl/types:optional",
-  ]
+  absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
   if (rtc_enable_protobuf) {
     sources += [ "testsupport/perf_test_histogram_writer.cc" ]
     deps += [
@@ -375,6 +372,16 @@
 }
 
 if (rtc_include_tests) {
+  rtc_library("resources_dir_flag") {
+    testonly = true
+    visibility = [ "*" ]
+    sources = [
+      "testsupport/resources_dir_flag.cc",
+      "testsupport/resources_dir_flag.h",
+    ]
+    absl_deps = [ "//third_party/abseil-cpp/absl/flags:flag" ]
+  }
+
   rtc_library("test_main_lib") {
     visibility = [ "*" ]
     testonly = true
@@ -611,16 +618,6 @@
   }
 }
 
-rtc_library("resources_dir_flag") {
-  testonly = true
-  visibility = [ "*" ]
-  sources = [
-    "testsupport/resources_dir_flag.cc",
-    "testsupport/resources_dir_flag.h",
-  ]
-  absl_deps = [ "//third_party/abseil-cpp/absl/flags:flag" ]
-}
-
 # We separate header into own target to make it possible for downstream
 # projects to override implementation.
 rtc_source_set("fileutils_override_api") {