diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-07 17:10:46 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-07 17:10:46 +0000 |
commit | 48e410fb9a60b94208ee484e3e2044b2733cbbfe (patch) | |
tree | eda2a27a70e2ef6bb17891a6c9917f8ad77e8827 /content | |
parent | 6f50ba4acf5090a3d11f38535c749477e8a74332 (diff) | |
download | chromium_src-48e410fb9a60b94208ee484e3e2044b2733cbbfe.zip chromium_src-48e410fb9a60b94208ee484e3e2044b2733cbbfe.tar.gz chromium_src-48e410fb9a60b94208ee484e3e2044b2733cbbfe.tar.bz2 |
Fix and enable reenable tests for P2PTransportImpl.
The tests were failing with Release builds because ASSERT() was used
instead of ASSERT_TRUE(), and so the code in ASSERT() wasn't executing.
Also fixed a bug in IPEndPoint::GetFamily() which caused the crash in unittests.
BUG=78663
TEST=Unittests
Review URL: http://codereview.chromium.org/6816002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80800 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/renderer/p2p/p2p_transport_impl_unittest.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/content/renderer/p2p/p2p_transport_impl_unittest.cc b/content/renderer/p2p/p2p_transport_impl_unittest.cc index 7cbac8a..f7b9bfe 100644 --- a/content/renderer/p2p/p2p_transport_impl_unittest.cc +++ b/content/renderer/p2p/p2p_transport_impl_unittest.cc @@ -202,14 +202,14 @@ class P2PTransportImplTest : public testing::Test { socket_manager_ = new jingle_glue::FakeSocketManager(); net::IPAddressNumber ip; - ASSERT(net::ParseIPLiteralToNumber(kTestAddress1, &ip)); + ASSERT_TRUE(net::ParseIPLiteralToNumber(kTestAddress1, &ip)); network_manager1_.reset(new jingle_glue::FakeNetworkManager(ip)); socket_factory1_.reset( new jingle_glue::FakeSocketFactory(socket_manager_, ip)); transport1_.reset(new P2PTransportImpl(network_manager1_.get(), socket_factory1_.get())); - ASSERT(net::ParseIPLiteralToNumber(kTestAddress2, &ip)); + ASSERT_TRUE(net::ParseIPLiteralToNumber(kTestAddress2, &ip)); network_manager2_.reset(new jingle_glue::FakeNetworkManager(ip)); socket_factory2_.reset( new jingle_glue::FakeSocketFactory(socket_manager_, ip)); @@ -231,7 +231,7 @@ class P2PTransportImplTest : public testing::Test { MockP2PEventHandler event_handler2_; }; -TEST_F(P2PTransportImplTest, DISABLED_Create) { +TEST_F(P2PTransportImplTest, Create) { ASSERT_TRUE(transport1_->Init( kTransportName1, kTestConfig, &event_handler1_)); ASSERT_TRUE(transport2_->Init( @@ -247,7 +247,7 @@ ACTION_P(AddRemoteCandidate, transport) { EXPECT_TRUE(transport->AddRemoteCandidate(arg0)); } -TEST_F(P2PTransportImplTest, DISABLED_Connect) { +TEST_F(P2PTransportImplTest, Connect) { ASSERT_TRUE(transport1_->Init( kTransportName1, kTestConfig, &event_handler1_)); ASSERT_TRUE(transport2_->Init( @@ -261,7 +261,7 @@ TEST_F(P2PTransportImplTest, DISABLED_Connect) { message_loop_.RunAllPending(); } -TEST_F(P2PTransportImplTest, DISABLED_SendData) { +TEST_F(P2PTransportImplTest, SendData) { ASSERT_TRUE(transport1_->Init( kTransportName1, kTestConfig, &event_handler1_)); ASSERT_TRUE(transport2_->Init( |