Add multiplex case to codec_tests

Bug: webrtc:7671
Change-Id: I38de24ea300d69757f5bd07111abc83b1f042751
Reviewed-on: https://webrtc-review.googlesource.com/50700
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21991}
diff --git a/video/BUILD.gn b/video/BUILD.gn
index 144987f..0a7b331 100644
--- a/video/BUILD.gn
+++ b/video/BUILD.gn
@@ -341,6 +341,7 @@
       "../modules/video_coding:video_codec_interface",
       "../modules/video_coding:video_coding_utility",
       "../modules/video_coding:webrtc_h264",
+      "../modules/video_coding:webrtc_multiplex",
       "../modules/video_coding:webrtc_vp8_helpers",
       "../modules/video_coding:webrtc_vp9",
       "../rtc_base:checks",
diff --git a/video/end_to_end_tests/codec_tests.cc b/video/end_to_end_tests/codec_tests.cc
index dacbd4a..01c238a 100644
--- a/video/end_to_end_tests/codec_tests.cc
+++ b/video/end_to_end_tests/codec_tests.cc
@@ -8,7 +8,11 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
+#include "media/engine/internaldecoderfactory.h"
+#include "media/engine/internalencoderfactory.h"
 #include "modules/video_coding/codecs/h264/include/h264.h"
+#include "modules/video_coding/codecs/multiplex/include/multiplex_decoder_adapter.h"
+#include "modules/video_coding/codecs/multiplex/include/multiplex_encoder_adapter.h"
 #include "modules/video_coding/codecs/vp8/include/vp8.h"
 #include "modules/video_coding/codecs/vp9/include/vp9.h"
 #include "test/call_test.h"
@@ -122,6 +126,32 @@
                      VP9Decoder::Create());
   RunBaseTest(&test);
 }
+
+// Mutiplex tests are using VP9 as the underlying implementation.
+TEST_P(CodecEndToEndTest, SendsAndReceivesMultiplex) {
+  InternalEncoderFactory encoder_factory;
+  InternalDecoderFactory decoder_factory;
+  CodecObserver test(
+      5, kVideoRotation_0, "multiplex",
+      rtc::MakeUnique<MultiplexEncoderAdapter>(
+          &encoder_factory, SdpVideoFormat(cricket::kVp9CodecName)),
+      rtc::MakeUnique<MultiplexDecoderAdapter>(
+          &decoder_factory, SdpVideoFormat(cricket::kVp9CodecName)));
+  RunBaseTest(&test);
+}
+
+TEST_P(CodecEndToEndTest, SendsAndReceivesMultiplexVideoRotation90) {
+  InternalEncoderFactory encoder_factory;
+  InternalDecoderFactory decoder_factory;
+  CodecObserver test(
+      5, kVideoRotation_90, "multiplex",
+      rtc::MakeUnique<MultiplexEncoderAdapter>(
+          &encoder_factory, SdpVideoFormat(cricket::kVp9CodecName)),
+      rtc::MakeUnique<MultiplexDecoderAdapter>(
+          &decoder_factory, SdpVideoFormat(cricket::kVp9CodecName)));
+  RunBaseTest(&test);
+}
+
 #endif  // !defined(RTC_DISABLE_VP9)
 
 #if defined(WEBRTC_USE_H264)