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

Side by Side Diff: net/dns/mdns_client_unittest.cc

Issue 509563003: Remove implicit conversions from scoped_refptr to T* in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « net/base/upload_file_element_reader.cc ('k') | net/dns/mock_host_resolver.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <queue> 5 #include <queue>
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "net/base/rand_callback.h" 9 #include "net/base/rand_callback.h"
10 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 EXPECT_CALL(*socket_ipv6_, RecvFrom(_, _, _, _)) 1156 EXPECT_CALL(*socket_ipv6_, RecvFrom(_, _, _, _))
1157 .WillOnce(Return(ERR_IO_PENDING)); 1157 .WillOnce(Return(ERR_IO_PENDING));
1158 1158
1159 ASSERT_TRUE(InitConnection()); 1159 ASSERT_TRUE(InitConnection());
1160 1160
1161 EXPECT_CALL(*socket_ipv4_, 1161 EXPECT_CALL(*socket_ipv4_,
1162 SendToInternal(sample_packet, "224.0.0.251:5353", _)); 1162 SendToInternal(sample_packet, "224.0.0.251:5353", _));
1163 EXPECT_CALL(*socket_ipv6_, 1163 EXPECT_CALL(*socket_ipv6_,
1164 SendToInternal(sample_packet, "[ff02::fb]:5353", _)); 1164 SendToInternal(sample_packet, "[ff02::fb]:5353", _));
1165 1165
1166 connection_.Send(buf, buf->size()); 1166 connection_.Send(buf.get(), buf->size());
1167 } 1167 }
1168 1168
1169 TEST_F(MDnsConnectionTest, Error) { 1169 TEST_F(MDnsConnectionTest, Error) {
1170 CompletionCallback callback; 1170 CompletionCallback callback;
1171 1171
1172 EXPECT_CALL(*socket_ipv4_, RecvFrom(_, _, _, _)) 1172 EXPECT_CALL(*socket_ipv4_, RecvFrom(_, _, _, _))
1173 .WillOnce(Return(ERR_IO_PENDING)); 1173 .WillOnce(Return(ERR_IO_PENDING));
1174 EXPECT_CALL(*socket_ipv6_, RecvFrom(_, _, _, _)) 1174 EXPECT_CALL(*socket_ipv6_, RecvFrom(_, _, _, _))
1175 .WillOnce(DoAll(SaveArg<3>(&callback), Return(ERR_IO_PENDING))); 1175 .WillOnce(DoAll(SaveArg<3>(&callback), Return(ERR_IO_PENDING)));
1176 1176
1177 ASSERT_TRUE(InitConnection()); 1177 ASSERT_TRUE(InitConnection());
1178 1178
1179 EXPECT_CALL(delegate_, OnConnectionError(ERR_SOCKET_NOT_CONNECTED)); 1179 EXPECT_CALL(delegate_, OnConnectionError(ERR_SOCKET_NOT_CONNECTED));
1180 callback.Run(ERR_SOCKET_NOT_CONNECTED); 1180 callback.Run(ERR_SOCKET_NOT_CONNECTED);
1181 } 1181 }
1182 1182
1183 } // namespace 1183 } // namespace
1184 1184
1185 } // namespace net 1185 } // namespace net
OLDNEW
« no previous file with comments | « net/base/upload_file_element_reader.cc ('k') | net/dns/mock_host_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698