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

Side by Side Diff: remoting/protocol/message_reader_unittest.cc

Issue 1080593003: Pass in a non-null CertVerifier into SSLClientSocket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@boringnss
Patch Set: fix comment typo Created 5 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 // finished processing the previous message. 272 // finished processing the previous message.
273 EXPECT_FALSE(socket_.read_pending()); 273 EXPECT_FALSE(socket_.read_pending());
274 274
275 done_task.Run(); 275 done_task.Run();
276 276
277 EXPECT_TRUE(socket_.read_pending()); 277 EXPECT_TRUE(socket_.read_pending());
278 } 278 }
279 279
280 // Read() returns error. 280 // Read() returns error.
281 TEST_F(MessageReaderTest, ReadError) { 281 TEST_F(MessageReaderTest, ReadError) {
282 socket_.set_next_read_error(net::ERR_FAILED); 282 socket_.AppendReadError(net::ERR_FAILED);
283 283
284 // Add a message. It should never be read after the error above. 284 // Add a message. It should never be read after the error above.
285 AddMessage(kTestMessage1); 285 AddMessage(kTestMessage1);
286 286
287 EXPECT_CALL(callback_, OnMessage(_)) 287 EXPECT_CALL(callback_, OnMessage(_))
288 .Times(0); 288 .Times(0);
289 289
290 InitReader(); 290 InitReader();
291 } 291 }
292 292
(...skipping 24 matching lines...) Expand all
317 EXPECT_CALL(callback_, OnMessage(_)) 317 EXPECT_CALL(callback_, OnMessage(_))
318 .Times(1) 318 .Times(1)
319 .WillOnce(Invoke(this, &MessageReaderTest::DeleteReader)); 319 .WillOnce(Invoke(this, &MessageReaderTest::DeleteReader));
320 320
321 InitReader(); 321 InitReader();
322 base::RunLoop().RunUntilIdle(); 322 base::RunLoop().RunUntilIdle();
323 } 323 }
324 324
325 } // namespace protocol 325 } // namespace protocol
326 } // namespace remoting 326 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/fake_stream_socket.cc ('k') | remoting/protocol/ssl_hmac_channel_authenticator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698