GN: Fix resource files for iOS test target

In order to get resource files to be properly packaged into
the .app for a unit test on iOS, the resource files needs
to be listed as sources in a bundle_data target.

BUG=webrtc:5949
NOTRY=True

Review-Url: https://codereview.webrtc.org/2292853002
Cr-Commit-Position: refs/heads/master@{#13968}
diff --git a/webrtc/test/BUILD.gn b/webrtc/test/BUILD.gn
index 9fd7d1a..993ff59 100644
--- a/webrtc/test/BUILD.gn
+++ b/webrtc/test/BUILD.gn
@@ -279,6 +279,28 @@
   ]
 }
 
+if (is_android || is_ios) {
+  test_support_unittests_resources = [
+    "//resources/foreman_cif_short.yuv",
+    "//resources/video_coding/frame-ethernet-ii.pcap",
+    "//resources/video_coding/frame-loopback.pcap",
+    "//resources/video_coding/pltype103.rtp",
+    "//resources/video_coding/pltype103_header_only.rtp",
+    "//resources/video_coding/ssrcs-2.pcap",
+    "//resources/video_coding/ssrcs-3.pcap",
+  ]
+}
+
+if (is_ios) {
+  bundle_data("test_support_unittests_bundle_data") {
+    testonly = true
+    sources = test_support_unittests_resources
+    outputs = [
+      "{{bundle_resources_dir}}/{{source_file_part}}",
+    ]
+  }
+}
+
 test("test_support_unittests") {
   deps = []
   sources = [
@@ -318,19 +340,12 @@
 
   if (is_android) {
     deps += [ "//testing/android/native_test:native_test_support" ]
+    data = test_support_unittests_resources
     shard_timeout = 900
   }
 
-  if (is_android || is_ios) {
-    data = [
-      "//resources/foreman_cif_short.yuv",
-      "//resources/video_coding/frame-ethernet-ii.pcap",
-      "//resources/video_coding/frame-loopback.pcap",
-      "//resources/video_coding/pltype103.rtp",
-      "//resources/video_coding/pltype103_header_only.rtp",
-      "//resources/video_coding/ssrcs-2.pcap",
-      "//resources/video_coding/ssrcs-3.pcap",
-    ]
+  if (is_ios) {
+    deps += [ ":test_support_unittests_bundle_data" ]
   }
 
   deps += [