Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Unified Diff: net/dns/dns_transaction_unittest.cc

Issue 9251019: Fixes to socket_test_util.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unsafe pointers to sockets. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/ftp/ftp_network_transaction.h » ('j') | net/socket/socket_test_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_transaction_unittest.cc
diff --git a/net/dns/dns_transaction_unittest.cc b/net/dns/dns_transaction_unittest.cc
index 3e3c2fe7a0f464dfa63082e7f65f2339a38a3fb8..545dee4cbdf4c0f07443d9e06553088c4137965e 100644
--- a/net/dns/dns_transaction_unittest.cc
+++ b/net/dns/dns_transaction_unittest.cc
@@ -150,9 +150,9 @@ TEST_F(DnsTransactionTest, FirstTimeoutTest) {
arraysize(kT0ResponseDatagram))
};
- scoped_refptr<DelayedSocketData> socket0_data(
+ scoped_ptr<DelayedSocketData> socket0_data(
new DelayedSocketData(2, NULL, 0, writes0, arraysize(writes0)));
- scoped_refptr<DelayedSocketData> socket1_data(
+ scoped_ptr<DelayedSocketData> socket1_data(
new DelayedSocketData(0, reads0, arraysize(reads0),
writes0, arraysize(writes0)));
@@ -172,7 +172,6 @@ TEST_F(DnsTransactionTest, FirstTimeoutTest) {
EXPECT_TRUE(socket0_data->at_write_eof());
EXPECT_TRUE(socket1_data->at_read_eof());
EXPECT_TRUE(socket1_data->at_write_eof());
- EXPECT_EQ(2u, factory().udp_client_sockets().size());
}
// Test that after the first timeout we do a fresh connection, and after
@@ -189,11 +188,11 @@ TEST_F(DnsTransactionTest, SecondTimeoutTest) {
arraysize(kT0ResponseDatagram))
};
- scoped_refptr<DelayedSocketData> socket0_data(
+ scoped_ptr<DelayedSocketData> socket0_data(
new DelayedSocketData(2, NULL, 0, writes0, arraysize(writes0)));
- scoped_refptr<DelayedSocketData> socket1_data(
+ scoped_ptr<DelayedSocketData> socket1_data(
new DelayedSocketData(2, NULL, 0, writes0, arraysize(writes0)));
- scoped_refptr<DelayedSocketData> socket2_data(
+ scoped_ptr<DelayedSocketData> socket2_data(
new DelayedSocketData(0, reads0, arraysize(reads0),
writes0, arraysize(writes0)));
@@ -216,7 +215,6 @@ TEST_F(DnsTransactionTest, SecondTimeoutTest) {
EXPECT_TRUE(socket1_data->at_write_eof());
EXPECT_TRUE(socket2_data->at_read_eof());
EXPECT_TRUE(socket2_data->at_write_eof());
- EXPECT_EQ(3u, factory().udp_client_sockets().size());
eroman 2012/01/21 01:18:30 is this change intentional?
szym 2012/01/21 06:59:16 Yes. This check was redundant. There is only 3 Soc
}
// Test that after the first timeout we do a fresh connection, and after
@@ -228,11 +226,11 @@ TEST_F(DnsTransactionTest, ThirdTimeoutTest) {
arraysize(kT0QueryDatagram))
};
- scoped_refptr<DelayedSocketData> socket0_data(
+ scoped_ptr<DelayedSocketData> socket0_data(
new DelayedSocketData(2, NULL, 0, writes0, arraysize(writes0)));
- scoped_refptr<DelayedSocketData> socket1_data(
+ scoped_ptr<DelayedSocketData> socket1_data(
new DelayedSocketData(2, NULL, 0, writes0, arraysize(writes0)));
- scoped_refptr<DelayedSocketData> socket2_data(
+ scoped_ptr<DelayedSocketData> socket2_data(
new DelayedSocketData(2, NULL, 0, writes0, arraysize(writes0)));
// Use short timeout to speed up the test.
@@ -254,7 +252,6 @@ TEST_F(DnsTransactionTest, ThirdTimeoutTest) {
EXPECT_TRUE(socket1_data->at_write_eof());
EXPECT_TRUE(socket2_data->at_read_eof());
EXPECT_TRUE(socket2_data->at_write_eof());
- EXPECT_EQ(3u, factory().udp_client_sockets().size());
eroman 2012/01/21 01:18:30 is this change intentional?
}
} // namespace
« no previous file with comments | « no previous file | net/ftp/ftp_network_transaction.h » ('j') | net/socket/socket_test_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698