Use a NULL session in unit tests that don't actually use the session.

This is a part of the big BUNDLE implementation at https://webrtc-codereview.appspot.com/45519004/

R=decurtis@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/49379004

Cr-Commit-Position: refs/heads/master@{#8721}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8721 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/app/webrtc/statscollector_unittest.cc b/talk/app/webrtc/statscollector_unittest.cc
index 5d41dc8..ccf3e22 100644
--- a/talk/app/webrtc/statscollector_unittest.cc
+++ b/talk/app/webrtc/statscollector_unittest.cc
@@ -790,7 +790,7 @@
 
   MockVideoMediaChannel* media_channel = new MockVideoMediaChannel();
   cricket::VideoChannel video_channel(rtc::Thread::Current(),
-      media_engine_, media_channel, &session_, kVideoChannelName, false, NULL);
+      media_engine_, media_channel, NULL, kVideoChannelName, false, NULL);
   StatsReports reports;  // returned values.
   cricket::VideoSenderInfo video_sender_info;
   cricket::VideoMediaInfo stats_read;
@@ -833,7 +833,7 @@
 
   MockVideoMediaChannel* media_channel = new MockVideoMediaChannel();
   cricket::VideoChannel video_channel(rtc::Thread::Current(),
-      media_engine_, media_channel, &session_, kVideoChannelName, false, NULL);
+      media_engine_, media_channel, NULL, kVideoChannelName, false, NULL);
 
   StatsReports reports;  // returned values.
   cricket::VideoSenderInfo video_sender_info;
@@ -912,7 +912,7 @@
 
   MockVideoMediaChannel* media_channel = new MockVideoMediaChannel();
   cricket::VideoChannel video_channel(rtc::Thread::Current(),
-      media_engine_, media_channel, &session_, "video", false, NULL);
+      media_engine_, media_channel, NULL, "video", false, NULL);
   AddOutgoingVideoTrackStats();
   stats.AddStream(stream_);
 
@@ -944,7 +944,7 @@
 
   MockVideoMediaChannel* media_channel = new MockVideoMediaChannel();
   cricket::VideoChannel video_channel(rtc::Thread::Current(),
-      media_engine_, media_channel, &session_, kVideoChannelName, false, NULL);
+      media_engine_, media_channel, NULL, kVideoChannelName, false, NULL);
   AddOutgoingVideoTrackStats();
   stats.AddStream(stream_);
 
@@ -1005,7 +1005,7 @@
   // The content_name known by the video channel.
   const std::string kVcName("vcname");
   cricket::VideoChannel video_channel(rtc::Thread::Current(),
-      media_engine_, media_channel, &session_, kVcName, false, NULL);
+      media_engine_, media_channel, NULL, kVcName, false, NULL);
   AddOutgoingVideoTrackStats();
   stats.AddStream(stream_);
 
@@ -1063,7 +1063,7 @@
   // The content_name known by the video channel.
   const std::string kVcName("vcname");
   cricket::VideoChannel video_channel(rtc::Thread::Current(),
-      media_engine_, media_channel, &session_, kVcName, false, NULL);
+      media_engine_, media_channel, NULL, kVcName, false, NULL);
   AddOutgoingVideoTrackStats();
   stats.AddStream(stream_);
 
@@ -1090,7 +1090,7 @@
   // The content_name known by the video channel.
   const std::string kVcName("vcname");
   cricket::VideoChannel video_channel(rtc::Thread::Current(),
-      media_engine_, media_channel, &session_, kVcName, false, NULL);
+      media_engine_, media_channel, NULL, kVcName, false, NULL);
   AddOutgoingVideoTrackStats();
   stats.AddStream(stream_);
 
@@ -1142,7 +1142,7 @@
 
   MockVideoMediaChannel* media_channel = new MockVideoMediaChannel();
   cricket::VideoChannel video_channel(rtc::Thread::Current(),
-      media_engine_, media_channel, &session_, kVideoChannelName, false, NULL);
+      media_engine_, media_channel, NULL, kVideoChannelName, false, NULL);
   AddIncomingVideoTrackStats();
   stats.AddStream(stream_);
 
@@ -1452,7 +1452,7 @@
   // The content_name known by the voice channel.
   const std::string kVcName("vcname");
   cricket::VoiceChannel voice_channel(rtc::Thread::Current(),
-      media_engine_, media_channel, &session_, kVcName, false);
+      media_engine_, media_channel, NULL, kVcName, false);
   AddOutgoingAudioTrackStats();
   stats.AddStream(stream_);
   stats.AddLocalAudioTrack(audio_track_, kSsrcOfTrack);
@@ -1485,7 +1485,7 @@
   // The content_name known by the voice channel.
   const std::string kVcName("vcname");
   cricket::VoiceChannel voice_channel(rtc::Thread::Current(),
-      media_engine_, media_channel, &session_, kVcName, false);
+      media_engine_, media_channel, NULL, kVcName, false);
   AddIncomingAudioTrackStats();
   stats.AddStream(stream_);
 
@@ -1512,7 +1512,7 @@
   // The content_name known by the voice channel.
   const std::string kVcName("vcname");
   cricket::VoiceChannel voice_channel(rtc::Thread::Current(),
-      media_engine_, media_channel, &session_, kVcName, false);
+      media_engine_, media_channel, NULL, kVcName, false);
   AddOutgoingAudioTrackStats();
   stats.AddStream(stream_);
   stats.AddLocalAudioTrack(audio_track_.get(), kSsrcOfTrack);
@@ -1570,7 +1570,7 @@
   // The content_name known by the voice channel.
   const std::string kVcName("vcname");
   cricket::VoiceChannel voice_channel(rtc::Thread::Current(),
-      media_engine_, media_channel, &session_, kVcName, false);
+      media_engine_, media_channel, NULL, kVcName, false);
 
   // Create a local stream with a local audio track and adds it to the stats.
   AddOutgoingAudioTrackStats();
@@ -1653,7 +1653,7 @@
   // The content_name known by the voice channel.
   const std::string kVcName("vcname");
   cricket::VoiceChannel voice_channel(rtc::Thread::Current(),
-      media_engine_, media_channel, &session_, kVcName, false);
+      media_engine_, media_channel, NULL, kVcName, false);
 
   // Create a local stream with a local audio track and adds it to the stats.
   AddOutgoingAudioTrackStats();
diff --git a/talk/session/media/mediarecorder_unittest.cc b/talk/session/media/mediarecorder_unittest.cc
index 74e8d49..2a36e67 100644
--- a/talk/session/media/mediarecorder_unittest.cc
+++ b/talk/session/media/mediarecorder_unittest.cc
@@ -334,11 +334,9 @@
 
 TEST(MediaRecorderTest, TestMediaRecorderVoiceChannel) {
   // Create the voice channel.
-  FakeSession session(true);
   FakeMediaEngine media_engine;
   VoiceChannel channel(rtc::Thread::Current(), &media_engine,
-                       new FakeVoiceMediaChannel(NULL), &session, "", false);
-  EXPECT_TRUE(channel.Init());
+                       new FakeVoiceMediaChannel(NULL), NULL, "", false);
   TestMediaRecorder(&channel, NULL, PF_RTPPACKET);
   TestMediaRecorder(&channel, NULL, PF_RTPHEADER);
   TestRecordHeaderAndMedia(&channel, NULL);
@@ -346,12 +344,10 @@
 
 TEST(MediaRecorderTest, TestMediaRecorderVideoChannel) {
   // Create the video channel.
-  FakeSession session(true);
   FakeMediaEngine media_engine;
   FakeVideoMediaChannel* media_channel = new FakeVideoMediaChannel(NULL);
   VideoChannel channel(rtc::Thread::Current(), &media_engine,
-                       media_channel, &session, "", false, NULL);
-  EXPECT_TRUE(channel.Init());
+                       media_channel, NULL, "", false, NULL);
   TestMediaRecorder(&channel, media_channel, PF_RTPPACKET);
   TestMediaRecorder(&channel, media_channel, PF_RTPHEADER);
   TestRecordHeaderAndMedia(&channel, media_channel);