enabling disabled data channels tests on win32. The real culprit was that ice candidates not included in SDP when there were failure causing transport channels never becoming writable.

BUG=2799
R=jiayl@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5410 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/app/webrtc/peerconnectioninterface_unittest.cc b/talk/app/webrtc/peerconnectioninterface_unittest.cc
index 093b842..e47e5b1 100644
--- a/talk/app/webrtc/peerconnectioninterface_unittest.cc
+++ b/talk/app/webrtc/peerconnectioninterface_unittest.cc
@@ -179,6 +179,7 @@
     EXPECT_EQ(pc_->ice_gathering_state(), new_state);
   }
   virtual void OnIceCandidate(const webrtc::IceCandidateInterface* candidate) {
+
     EXPECT_NE(PeerConnectionInterface::kIceGatheringNew,
               pc_->ice_gathering_state());
 
@@ -496,6 +497,8 @@
 
     EXPECT_TRUE(DoSetLocalDescription(new_offer));
     EXPECT_EQ(PeerConnectionInterface::kHaveLocalOffer, observer_.state_);
+    // Wait for the ice_complete message, so that SDP will have candidates.
+    EXPECT_TRUE_WAIT(observer_.ice_complete_, kTimeout);
   }
 
   void CreateAnswerAsRemoteDescription(const std::string& offer) {
@@ -766,13 +769,7 @@
 }
 
 // This test setup two RTP data channels in loop back.
-#ifdef WIN32
-// TODO(perkj): Investigate why the transport channel sometimes don't become
-// writable on Windows when we try to connect in loop back.
-TEST_F(PeerConnectionInterfaceTest, DISABLED_TestDataChannel) {
-#else
 TEST_F(PeerConnectionInterfaceTest, TestDataChannel) {
-#endif
   FakeConstraints constraints;
   constraints.SetAllowRtpDataChannels();
   CreatePeerConnection(&constraints);
@@ -819,13 +816,7 @@
 
 // This test verifies that sendnig binary data over RTP data channels should
 // fail.
-#ifdef WIN32
-// TODO(perkj): Investigate why the transport channel sometimes don't become
-// writable on Windows when we try to connect in loop back.
-TEST_F(PeerConnectionInterfaceTest, DISABLED_TestSendBinaryOnRtpDataChannel) {
-#else
 TEST_F(PeerConnectionInterfaceTest, TestSendBinaryOnRtpDataChannel) {
-#endif
   FakeConstraints constraints;
   constraints.SetAllowRtpDataChannels();
   CreatePeerConnection(&constraints);
@@ -855,13 +846,7 @@
 
 // This test setup a RTP data channels in loop back and test that a channel is
 // opened even if the remote end answer with a zero SSRC.
-#ifdef WIN32
-// TODO(perkj): Investigate why the transport channel sometimes don't become
-// writable on Windows when we try to connect in loop back.
-TEST_F(PeerConnectionInterfaceTest, DISABLED_TestSendOnlyDataChannel) {
-#else
 TEST_F(PeerConnectionInterfaceTest, TestSendOnlyDataChannel) {
-#endif
   FakeConstraints constraints;
   constraints.SetAllowRtpDataChannels();
   CreatePeerConnection(&constraints);
@@ -1017,14 +1002,7 @@
 }
 
 // This test that a data channel closes when a PeerConnection is deleted/closed.
-#ifdef WIN32
-// TODO(perkj): Investigate why the transport channel sometimes don't become
-// writable on Windows when we try to connect in loop back.
-TEST_F(PeerConnectionInterfaceTest,
-       DISABLED_DataChannelCloseWhenPeerConnectionClose) {
-#else
 TEST_F(PeerConnectionInterfaceTest, DataChannelCloseWhenPeerConnectionClose) {
-#endif
   FakeConstraints constraints;
   constraints.SetAllowRtpDataChannels();
   CreatePeerConnection(&constraints);