Add a new test binary to check if split-channel works

This test (and binary) will be used to verify that the field trial
for enabling split-MediaChannel works in both "off" and "on" modes,
so that it can be run as a field trial. It is intended to be deleted
once the conversion to split-MediaChannel is complete.

Bug: webrtc:13931
Change-Id: If62d19be9b2f205067b86dc859946279442fdd58
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296322
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39493}
diff --git a/BUILD.gn b/BUILD.gn
index 1bdda46..59c3af1 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -64,6 +64,7 @@
         "modules/rtp_rtcp:test_packet_masks_metrics",
         "modules/video_capture:video_capture_internal_impl",
         "net/dcsctp:dcsctp_unittests",
+        "pc:peer_connection_mediachannel_split_unittests",
         "pc:peerconnection_unittests",
         "pc:rtc_pc_unittests",
         "pc:slow_peer_connection_unittests",
diff --git a/infra/specs/client.webrtc.json b/infra/specs/client.webrtc.json
index e75777a..bd5d556 100644
--- a/infra/specs/client.webrtc.json
+++ b/infra/specs/client.webrtc.json
@@ -207,6 +207,29 @@
               "os": "Android"
             }
           ],
+          "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
+        },
+        "test": "peer_connection_mediachannel_split_unittests",
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_gtest_merge.py"
+        },
+        "resultdb": {
+          "enable": true,
+          "has_native_resultdb_integration": true
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "android_devices": "1",
+              "device_type": "walleye",
+              "os": "Android"
+            }
+          ],
           "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
           "shards": 4
         },
@@ -722,6 +745,29 @@
               "os": "Android"
             }
           ],
+          "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
+        },
+        "test": "peer_connection_mediachannel_split_unittests",
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_gtest_merge.py"
+        },
+        "resultdb": {
+          "enable": true,
+          "has_native_resultdb_integration": true
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "android_devices": "1",
+              "device_type": "walleye",
+              "os": "Android"
+            }
+          ],
           "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
           "shards": 4
         },
@@ -1268,6 +1314,29 @@
               "os": "Android"
             }
           ],
+          "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
+        },
+        "test": "peer_connection_mediachannel_split_unittests",
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_gtest_merge.py"
+        },
+        "resultdb": {
+          "enable": true,
+          "has_native_resultdb_integration": true
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "android_devices": "1",
+              "device_type": "walleye",
+              "os": "Android"
+            }
+          ],
           "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
           "shards": 4
         },
@@ -1783,6 +1852,29 @@
               "os": "Android"
             }
           ],
+          "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
+        },
+        "test": "peer_connection_mediachannel_split_unittests",
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_gtest_merge.py"
+        },
+        "resultdb": {
+          "enable": true,
+          "has_native_resultdb_integration": true
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "android_devices": "1",
+              "device_type": "walleye",
+              "os": "Android"
+            }
+          ],
           "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
           "shards": 4
         },
@@ -2591,6 +2683,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -3045,6 +3158,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-20.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -3478,6 +3612,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -3911,6 +4066,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -4365,6 +4541,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -4819,6 +5016,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -5253,6 +5471,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -5688,6 +5927,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -6143,6 +6403,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -6628,6 +6909,28 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cores": "12",
+              "cpu": "x86-64",
+              "os": "Mac-12"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -7082,6 +7385,28 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cores": "12",
+              "cpu": "x86-64",
+              "os": "Mac-12"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -7528,6 +7853,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Mac-12"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -7983,6 +8329,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "arm64-64-Apple_M1",
+              "os": "Mac-12"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -8445,6 +8812,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Windows-10-19045"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -8878,6 +9266,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Windows-10-19045"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -9311,6 +9720,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Windows-10-19045"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -9744,6 +10174,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Windows-10-19045"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
diff --git a/infra/specs/gn_isolate_map.pyl b/infra/specs/gn_isolate_map.pyl
index c7c472f..8b1ce27 100644
--- a/infra/specs/gn_isolate_map.pyl
+++ b/infra/specs/gn_isolate_map.pyl
@@ -84,6 +84,10 @@
     "label": "//modules:modules_unittests",
     "type": "windowed_test_launcher",
   },
+  "peer_connection_mediachannel_split_unittests": {
+    "label": "//pc:peer_connection_mediachannel_split_unittests",
+    "type": "console_test_launcher",
+  },
   "peerconnection_unittests": {
     "label": "//pc:peerconnection_unittests",
     "type": "console_test_launcher",
diff --git a/infra/specs/test_suites.pyl b/infra/specs/test_suites.pyl
index 2e63046..2ec8902 100644
--- a/infra/specs/test_suites.pyl
+++ b/infra/specs/test_suites.pyl
@@ -40,6 +40,7 @@
       'modules_unittests': {
         'mixins': ['shards-6'],
       },
+      'peer_connection_mediachannel_split_unittests': {},
       'peerconnection_unittests': {
         'mixins': ['shards-4'],
       },
@@ -94,6 +95,7 @@
       'modules_unittests': {
         'mixins': ['shards-6'],
       },
+      'peer_connection_mediachannel_split_unittests': {},
       'peerconnection_unittests': {
         'mixins': ['shards-4'],
       },
diff --git a/infra/specs/tryserver.webrtc.json b/infra/specs/tryserver.webrtc.json
index 285bafb..56c8e3f 100644
--- a/infra/specs/tryserver.webrtc.json
+++ b/infra/specs/tryserver.webrtc.json
@@ -207,6 +207,29 @@
               "os": "Android"
             }
           ],
+          "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
+        },
+        "test": "peer_connection_mediachannel_split_unittests",
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_gtest_merge.py"
+        },
+        "resultdb": {
+          "enable": true,
+          "has_native_resultdb_integration": true
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "android_devices": "1",
+              "device_type": "walleye",
+              "os": "Android"
+            }
+          ],
           "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
           "shards": 4
         },
@@ -749,6 +772,29 @@
               "os": "Android"
             }
           ],
+          "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
+        },
+        "test": "peer_connection_mediachannel_split_unittests",
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_gtest_merge.py"
+        },
+        "resultdb": {
+          "enable": true,
+          "has_native_resultdb_integration": true
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "android_devices": "1",
+              "device_type": "walleye",
+              "os": "Android"
+            }
+          ],
           "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
           "shards": 4
         },
@@ -1291,6 +1337,29 @@
               "os": "Android"
             }
           ],
+          "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
+        },
+        "test": "peer_connection_mediachannel_split_unittests",
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_gtest_merge.py"
+        },
+        "resultdb": {
+          "enable": true,
+          "has_native_resultdb_integration": true
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "android_devices": "1",
+              "device_type": "walleye",
+              "os": "Android"
+            }
+          ],
           "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
           "shards": 4
         },
@@ -1861,6 +1930,29 @@
               "os": "Android"
             }
           ],
+          "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
+        },
+        "test": "peer_connection_mediachannel_split_unittests",
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_gtest_merge.py"
+        },
+        "resultdb": {
+          "enable": true,
+          "has_native_resultdb_integration": true
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "android_devices": "1",
+              "device_type": "walleye",
+              "os": "Android"
+            }
+          ],
           "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
           "shards": 4
         },
@@ -5987,6 +6079,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -6454,6 +6567,28 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "isolate_profile_data": true,
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "isolate_profile_data": true,
         "merge": {
@@ -6973,6 +7108,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -7428,6 +7584,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -7908,6 +8085,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-20.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -8341,6 +8539,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -8844,6 +9063,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -9277,6 +9517,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -9731,6 +9992,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -10185,6 +10467,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -10618,6 +10921,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Ubuntu-18.04"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -11058,6 +11382,28 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cores": "12",
+              "cpu": "x86-64",
+              "os": "Mac-12"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -11513,6 +11859,28 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cores": "12",
+              "cpu": "x86-64",
+              "os": "Mac-12"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -11959,6 +12327,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "arm64-64-Apple_M1",
+              "os": "Mac-12"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -12392,6 +12781,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Mac-12"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -12874,6 +13284,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "arm64-64-Apple_M1",
+              "os": "Mac-12"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -13307,6 +13738,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Windows-10-19045"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -13744,6 +14196,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Windows-10-19045"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -14177,6 +14650,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Windows-10-19045"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -14610,6 +15104,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Windows-10-19045"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
@@ -15043,6 +15558,27 @@
         "test_id_prefix": "ninja://modules:modules_unittests/"
       },
       {
+        "isolate_name": "peer_connection_mediachannel_split_unittests",
+        "merge": {
+          "args": [],
+          "script": "//testing/merge_scripts/standard_isolated_script_merge.py"
+        },
+        "name": "peer_connection_mediachannel_split_unittests",
+        "resultdb": {
+          "result_format": "json"
+        },
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "cpu": "x86-64",
+              "os": "Windows-10-19045"
+            }
+          ]
+        },
+        "test_id_prefix": "ninja://pc:peer_connection_mediachannel_split_unittests/"
+      },
+      {
         "isolate_name": "peerconnection_unittests",
         "merge": {
           "args": [],
diff --git a/pc/BUILD.gn b/pc/BUILD.gn
index 2bcf9d3..cd91e08 100644
--- a/pc/BUILD.gn
+++ b/pc/BUILD.gn
@@ -2544,6 +2544,27 @@
     ]
   }
 
+  rtc_test("peer_connection_mediachannel_split_unittests") {
+    testonly = true
+    sources = [ "peer_connection_mediachannel_split_unittest.cc" ]
+    deps = [
+      ":integration_test_helpers",
+      ":session_description",
+      "../api:libjingle_peerconnection_api",
+      "../api:media_stream_interface",
+      "../api:rtc_error",
+      "../api:rtc_stats_api",
+      "../api:scoped_refptr",
+      "../media:codec",
+      "../media:media_constants",
+      "../rtc_base:gunit_helpers",
+      "../rtc_base:rtc_base_tests_utils",
+      "../test:test_main",
+      "../test:test_support",
+    ]
+    absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
+  }
+
   rtc_library("data_channel_controller_unittest") {
     testonly = true
     sources = [ "data_channel_controller_unittest.cc" ]
diff --git a/pc/peer_connection_mediachannel_split_unittest.cc b/pc/peer_connection_mediachannel_split_unittest.cc
new file mode 100644
index 0000000..3eca104
--- /dev/null
+++ b/pc/peer_connection_mediachannel_split_unittest.cc
@@ -0,0 +1,183 @@
+/*
+ *  Copyright 2012 The WebRTC project authors. All Rights Reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+// Integration tests for PeerConnection to exercise the options of
+// either splitting or not splitting the MediaChannel object.
+// These tests exercise a full stack over a simulated network.
+
+// TODO(bugs.webrtc.org/13931): Delete these tests when split is landed.
+
+#include <string>
+#include <vector>
+
+#include "absl/types/optional.h"
+#include "api/media_stream_interface.h"
+#include "api/peer_connection_interface.h"
+#include "api/rtc_error.h"
+#include "api/scoped_refptr.h"
+#include "api/stats/rtc_stats.h"
+#include "api/stats/rtc_stats_report.h"
+#include "api/stats/rtcstats_objects.h"
+#include "media/base/codec.h"
+#include "media/base/media_constants.h"
+#include "pc/session_description.h"
+#include "pc/test/integration_test_helpers.h"
+#include "rtc_base/gunit.h"
+#include "rtc_base/virtual_socket_server.h"
+#include "test/gtest.h"
+
+namespace webrtc {
+
+namespace {
+
+class PeerConnectionMediaChannelSplitTest
+    : public PeerConnectionIntegrationBaseTest,
+      public ::testing::WithParamInterface<std::string> {
+ protected:
+  PeerConnectionMediaChannelSplitTest()
+      : PeerConnectionIntegrationBaseTest(SdpSemantics::kUnifiedPlan,
+                                          /* field_trials = */ GetParam()) {}
+};
+
+int NacksReceivedCount(PeerConnectionIntegrationWrapper& pc) {
+  rtc::scoped_refptr<const webrtc::RTCStatsReport> report = pc.NewGetStats();
+  auto sender_stats = report->GetStatsOfType<RTCOutboundRTPStreamStats>();
+  if (sender_stats.size() != 1) {
+    ADD_FAILURE();
+    return 0;
+  }
+  if (!sender_stats[0]->nack_count.is_defined()) {
+    return 0;
+  }
+  return *sender_stats[0]->nack_count;
+}
+
+int NacksSentCount(PeerConnectionIntegrationWrapper& pc) {
+  rtc::scoped_refptr<const webrtc::RTCStatsReport> report = pc.NewGetStats();
+  auto receiver_stats = report->GetStatsOfType<RTCInboundRTPStreamStats>();
+  if (receiver_stats.size() != 1) {
+    ADD_FAILURE();
+    return 0;
+  }
+  if (!receiver_stats[0]->nack_count.is_defined()) {
+    return 0;
+  }
+  return *receiver_stats[0]->nack_count;
+}
+
+// Test disabled because it is flaky.
+TEST_P(PeerConnectionMediaChannelSplitTest,
+       DISABLED_AudioPacketLossCausesNack) {
+  RTCConfiguration config;
+  ASSERT_TRUE(CreatePeerConnectionWrappersWithConfig(config, config));
+  ConnectFakeSignaling();
+  auto audio_transceiver_or_error =
+      caller()->pc()->AddTransceiver(caller()->CreateLocalAudioTrack());
+  ASSERT_TRUE(audio_transceiver_or_error.ok());
+  auto send_transceiver = audio_transceiver_or_error.MoveValue();
+  // Munge the SDP to include NACK and RRTR on Opus, and remove all other
+  // codecs.
+  caller()->SetGeneratedSdpMunger([](cricket::SessionDescription* desc) {
+    for (ContentInfo& content : desc->contents()) {
+      cricket::AudioContentDescription* media =
+          content.media_description()->as_audio();
+      std::vector<cricket::AudioCodec> codecs = media->codecs();
+      std::vector<cricket::AudioCodec> codecs_out;
+      for (cricket::AudioCodec codec : codecs) {
+        if (codec.name == "opus") {
+          codec.AddFeedbackParam(cricket::FeedbackParam(
+              cricket::kRtcpFbParamNack, cricket::kParamValueEmpty));
+          codec.AddFeedbackParam(cricket::FeedbackParam(
+              cricket::kRtcpFbParamRrtr, cricket::kParamValueEmpty));
+          codecs_out.push_back(codec);
+        }
+      }
+      EXPECT_FALSE(codecs_out.empty());
+      media->set_codecs(codecs_out);
+    }
+  });
+
+  caller()->CreateAndSetAndSignalOffer();
+  // Check for failure in helpers
+  ASSERT_FALSE(HasFailure());
+  MediaExpectations media_expectations;
+  media_expectations.CalleeExpectsSomeAudio(1);
+  ExpectNewFrames(media_expectations);
+  ASSERT_FALSE(HasFailure());
+
+  virtual_socket_server()->set_drop_probability(0.2);
+
+  // Wait until callee has sent at least one NACK.
+  // Note that due to stats caching, this might only be visible 50 ms
+  // after the nack was in fact sent.
+  EXPECT_TRUE_WAIT(NacksSentCount(*callee()) > 0, kDefaultTimeout);
+  ASSERT_FALSE(HasFailure());
+
+  virtual_socket_server()->set_drop_probability(0.0);
+  // Wait until caller has received at least one NACK
+  EXPECT_TRUE_WAIT(NacksReceivedCount(*caller()) > 0, kDefaultTimeout);
+}
+
+TEST_P(PeerConnectionMediaChannelSplitTest, VideoPacketLossCausesNack) {
+  RTCConfiguration config;
+  ASSERT_TRUE(CreatePeerConnectionWrappersWithConfig(config, config));
+  ConnectFakeSignaling();
+  auto video_transceiver_or_error =
+      caller()->pc()->AddTransceiver(caller()->CreateLocalVideoTrack());
+  ASSERT_TRUE(video_transceiver_or_error.ok());
+  auto send_transceiver = video_transceiver_or_error.MoveValue();
+  // Munge the SDP to include NACK and RRTR on VP8, and remove all other
+  // codecs.
+  caller()->SetGeneratedSdpMunger([](cricket::SessionDescription* desc) {
+    for (ContentInfo& content : desc->contents()) {
+      cricket::VideoContentDescription* media =
+          content.media_description()->as_video();
+      std::vector<cricket::VideoCodec> codecs = media->codecs();
+      std::vector<cricket::VideoCodec> codecs_out;
+      for (cricket::VideoCodec codec : codecs) {
+        if (codec.name == "VP8") {
+          ASSERT_TRUE(codec.HasFeedbackParam(cricket::FeedbackParam(
+              cricket::kRtcpFbParamNack, cricket::kParamValueEmpty)));
+          codecs_out.push_back(codec);
+        }
+      }
+      EXPECT_FALSE(codecs_out.empty());
+      media->set_codecs(codecs_out);
+    }
+  });
+
+  caller()->CreateAndSetAndSignalOffer();
+  // Check for failure in helpers
+  ASSERT_FALSE(HasFailure());
+  MediaExpectations media_expectations;
+  media_expectations.CalleeExpectsSomeVideo(1);
+  ExpectNewFrames(media_expectations);
+  ASSERT_FALSE(HasFailure());
+
+  virtual_socket_server()->set_drop_probability(0.2);
+
+  // Wait until callee has sent at least one NACK.
+  // Note that due to stats caching, this might only be visible 50 ms
+  // after the nack was in fact sent.
+  EXPECT_TRUE_WAIT(NacksSentCount(*callee()) > 0, kDefaultTimeout);
+  ASSERT_FALSE(HasFailure());
+
+  // Wait until caller has received at least one NACK
+  EXPECT_TRUE_WAIT(NacksReceivedCount(*caller()) > 0, kDefaultTimeout);
+}
+
+INSTANTIATE_TEST_SUITE_P(PeerConnectionMediaChannelSplitTest,
+                         PeerConnectionMediaChannelSplitTest,
+                         Values("WebRTC-SplitMediaChannel/Disabled/",
+                                "WebRTC-SplitMediaChannel/Enabled/"));
+
+}  // namespace
+
+}  // namespace webrtc