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

Side by Side Diff: net/socket_stream/socket_stream_unittest.cc

Issue 10408067: [net] Switch TestURLRequestContext to use MockCachingHostResolver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to trunk. Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « net/socket_stream/socket_stream.cc ('k') | net/url_request/url_request_test_util.h » ('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 (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 "net/socket_stream/socket_stream.h" 5 #include "net/socket_stream/socket_stream.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "net/base/auth.h" 14 #include "net/base/auth.h"
15 #include "net/base/mock_host_resolver.h" 15 #include "net/base/mock_host_resolver.h"
16 #include "net/base/net_log.h" 16 #include "net/base/net_log.h"
17 #include "net/base/net_log_unittest.h" 17 #include "net/base/net_log_unittest.h"
18 #include "net/base/test_completion_callback.h" 18 #include "net/base/test_completion_callback.h"
19 #include "net/proxy/proxy_service.h"
19 #include "net/socket/socket_test_util.h" 20 #include "net/socket/socket_test_util.h"
20 #include "net/url_request/url_request_test_util.h" 21 #include "net/url_request/url_request_test_util.h"
21 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
22 #include "testing/platform_test.h" 23 #include "testing/platform_test.h"
23 24
25 namespace {
26
24 struct SocketStreamEvent { 27 struct SocketStreamEvent {
25 enum EventType { 28 enum EventType {
26 EVENT_START_OPEN_CONNECTION, EVENT_CONNECTED, EVENT_SENT_DATA, 29 EVENT_START_OPEN_CONNECTION, EVENT_CONNECTED, EVENT_SENT_DATA,
27 EVENT_RECEIVED_DATA, EVENT_CLOSE, EVENT_AUTH_REQUIRED, EVENT_ERROR, 30 EVENT_RECEIVED_DATA, EVENT_CLOSE, EVENT_AUTH_REQUIRED, EVENT_ERROR,
28 }; 31 };
29 32
30 SocketStreamEvent(EventType type, 33 SocketStreamEvent(EventType type,
31 net::SocketStream* socket_stream, 34 net::SocketStream* socket_stream,
32 int num, 35 int num,
33 const std::string& str, 36 const std::string& str,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 base::Callback<void(SocketStreamEvent*)> on_close_; 171 base::Callback<void(SocketStreamEvent*)> on_close_;
169 base::Callback<void(SocketStreamEvent*)> on_auth_required_; 172 base::Callback<void(SocketStreamEvent*)> on_auth_required_;
170 base::Callback<void(SocketStreamEvent*)> on_error_; 173 base::Callback<void(SocketStreamEvent*)> on_error_;
171 const net::CompletionCallback callback_; 174 const net::CompletionCallback callback_;
172 net::CompletionCallback connection_callback_; 175 net::CompletionCallback connection_callback_;
173 net::AuthCredentials credentials_; 176 net::AuthCredentials credentials_;
174 177
175 DISALLOW_COPY_AND_ASSIGN(SocketStreamEventRecorder); 178 DISALLOW_COPY_AND_ASSIGN(SocketStreamEventRecorder);
176 }; 179 };
177 180
181 class TestURLRequestContextWithProxy : public TestURLRequestContext {
182 public:
183 explicit TestURLRequestContextWithProxy(const std::string& proxy)
184 : TestURLRequestContext(true) {
185 context_storage_.set_proxy_service(net::ProxyService::CreateFixed(proxy));
186 Init();
187 }
188 virtual ~TestURLRequestContextWithProxy() {}
189 };
190
191 } // namespace
192
178 namespace net { 193 namespace net {
179 194
180 class SocketStreamTest : public PlatformTest { 195 class SocketStreamTest : public PlatformTest {
181 public: 196 public:
182 virtual ~SocketStreamTest() {} 197 virtual ~SocketStreamTest() {}
183 virtual void SetUp() { 198 virtual void SetUp() {
184 mock_socket_factory_.reset(); 199 mock_socket_factory_.reset();
185 handshake_request_ = kWebSocketHandshakeRequest; 200 handshake_request_ = kWebSocketHandshakeRequest;
186 handshake_response_ = kWebSocketHandshakeResponse; 201 handshake_response_ = kWebSocketHandshakeResponse;
187 } 202 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 TestCompletionCallback test_callback; 286 TestCompletionCallback test_callback;
272 287
273 scoped_ptr<SocketStreamEventRecorder> delegate( 288 scoped_ptr<SocketStreamEventRecorder> delegate(
274 new SocketStreamEventRecorder(test_callback.callback())); 289 new SocketStreamEventRecorder(test_callback.callback()));
275 delegate->SetOnConnected(base::Bind( 290 delegate->SetOnConnected(base::Bind(
276 &SocketStreamTest::DoSendWebSocketHandshake, base::Unretained(this))); 291 &SocketStreamTest::DoSendWebSocketHandshake, base::Unretained(this)));
277 delegate->SetOnReceivedData(base::Bind( 292 delegate->SetOnReceivedData(base::Bind(
278 &SocketStreamTest::DoCloseFlushPendingWriteTest, 293 &SocketStreamTest::DoCloseFlushPendingWriteTest,
279 base::Unretained(this))); 294 base::Unretained(this)));
280 295
281 MockHostResolver host_resolver;
282 TestURLRequestContext context; 296 TestURLRequestContext context;
283 297
284 scoped_refptr<SocketStream> socket_stream( 298 scoped_refptr<SocketStream> socket_stream(
285 new SocketStream(GURL("ws://example.com/demo"), delegate.get())); 299 new SocketStream(GURL("ws://example.com/demo"), delegate.get()));
286 300
287 socket_stream->set_context(&context); 301 socket_stream->set_context(&context);
288 socket_stream->SetHostResolver(&host_resolver);
289 302
290 MockWrite data_writes[] = { 303 MockWrite data_writes[] = {
291 MockWrite(SocketStreamTest::kWebSocketHandshakeRequest), 304 MockWrite(SocketStreamTest::kWebSocketHandshakeRequest),
292 MockWrite(ASYNC, "\0message1\xff", 10), 305 MockWrite(ASYNC, "\0message1\xff", 10),
293 MockWrite(ASYNC, "\0message2\xff", 10) 306 MockWrite(ASYNC, "\0message2\xff", 10)
294 }; 307 };
295 MockRead data_reads[] = { 308 MockRead data_reads[] = {
296 MockRead(SocketStreamTest::kWebSocketHandshakeResponse), 309 MockRead(SocketStreamTest::kWebSocketHandshakeResponse),
297 // Server doesn't close the connection after handshake. 310 // Server doesn't close the connection after handshake.
298 MockRead(ASYNC, ERR_IO_PENDING) 311 MockRead(ASYNC, ERR_IO_PENDING)
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 base::Unretained(delegate.get()))); 386 base::Unretained(delegate.get())));
374 delegate->SetAuthInfo(net::AuthCredentials(ASCIIToUTF16("foo"), 387 delegate->SetAuthInfo(net::AuthCredentials(ASCIIToUTF16("foo"),
375 ASCIIToUTF16("bar"))); 388 ASCIIToUTF16("bar")));
376 delegate->SetOnAuthRequired(base::Bind( 389 delegate->SetOnAuthRequired(base::Bind(
377 &SocketStreamEventRecorder::DoRestartWithAuth, 390 &SocketStreamEventRecorder::DoRestartWithAuth,
378 base::Unretained(delegate.get()))); 391 base::Unretained(delegate.get())));
379 392
380 scoped_refptr<SocketStream> socket_stream( 393 scoped_refptr<SocketStream> socket_stream(
381 new SocketStream(GURL("ws://example.com/demo"), delegate.get())); 394 new SocketStream(GURL("ws://example.com/demo"), delegate.get()));
382 395
383 MockHostResolver host_resolver; 396 TestURLRequestContextWithProxy context("myproxy:70");
384 TestURLRequestContext context("myproxy:70");
385 397
386 socket_stream->set_context(&context); 398 socket_stream->set_context(&context);
387 socket_stream->SetHostResolver(&host_resolver);
388 socket_stream->SetClientSocketFactory(&mock_socket_factory); 399 socket_stream->SetClientSocketFactory(&mock_socket_factory);
389 400
390 socket_stream->Connect(); 401 socket_stream->Connect();
391 402
392 test_callback.WaitForResult(); 403 test_callback.WaitForResult();
393 404
394 const std::vector<SocketStreamEvent>& events = delegate->GetSeenEvents(); 405 const std::vector<SocketStreamEvent>& events = delegate->GetSeenEvents();
395 ASSERT_EQ(5U, events.size()); 406 ASSERT_EQ(5U, events.size());
396 407
397 EXPECT_EQ(SocketStreamEvent::EVENT_START_OPEN_CONNECTION, 408 EXPECT_EQ(SocketStreamEvent::EVENT_START_OPEN_CONNECTION,
(...skipping 13 matching lines...) Expand all
411 scoped_ptr<SocketStreamEventRecorder> delegate( 422 scoped_ptr<SocketStreamEventRecorder> delegate(
412 new SocketStreamEventRecorder(test_callback.callback())); 423 new SocketStreamEventRecorder(test_callback.callback()));
413 delegate->SetOnConnected(base::Bind( 424 delegate->SetOnConnected(base::Bind(
414 &SocketStreamTest::DoSendWebSocketHandshake, base::Unretained(this))); 425 &SocketStreamTest::DoSendWebSocketHandshake, base::Unretained(this)));
415 delegate->SetOnReceivedData(base::Bind( 426 delegate->SetOnReceivedData(base::Bind(
416 &SocketStreamTest::DoCloseFlushPendingWriteTest, 427 &SocketStreamTest::DoCloseFlushPendingWriteTest,
417 base::Unretained(this))); 428 base::Unretained(this)));
418 delegate->SetOnStartOpenConnection(base::Bind( 429 delegate->SetOnStartOpenConnection(base::Bind(
419 &SocketStreamTest::DoIOPending, base::Unretained(this))); 430 &SocketStreamTest::DoIOPending, base::Unretained(this)));
420 431
421 MockHostResolver host_resolver;
422 TestURLRequestContext context; 432 TestURLRequestContext context;
423 433
424 scoped_refptr<SocketStream> socket_stream( 434 scoped_refptr<SocketStream> socket_stream(
425 new SocketStream(GURL("ws://example.com/demo"), delegate.get())); 435 new SocketStream(GURL("ws://example.com/demo"), delegate.get()));
426 436
427 socket_stream->set_context(&context); 437 socket_stream->set_context(&context);
428 socket_stream->SetHostResolver(&host_resolver);
429 438
430 MockWrite data_writes[] = { 439 MockWrite data_writes[] = {
431 MockWrite(SocketStreamTest::kWebSocketHandshakeRequest), 440 MockWrite(SocketStreamTest::kWebSocketHandshakeRequest),
432 MockWrite(ASYNC, "\0message1\xff", 10), 441 MockWrite(ASYNC, "\0message1\xff", 10),
433 MockWrite(ASYNC, "\0message2\xff", 10) 442 MockWrite(ASYNC, "\0message2\xff", 10)
434 }; 443 };
435 MockRead data_reads[] = { 444 MockRead data_reads[] = {
436 MockRead(SocketStreamTest::kWebSocketHandshakeResponse), 445 MockRead(SocketStreamTest::kWebSocketHandshakeResponse),
437 // Server doesn't close the connection after handshake. 446 // Server doesn't close the connection after handshake.
438 MockRead(ASYNC, ERR_IO_PENDING) 447 MockRead(ASYNC, ERR_IO_PENDING)
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 } 484 }
476 485
477 TEST_F(SocketStreamTest, SwitchToSpdy) { 486 TEST_F(SocketStreamTest, SwitchToSpdy) {
478 TestCompletionCallback test_callback; 487 TestCompletionCallback test_callback;
479 488
480 scoped_ptr<SocketStreamEventRecorder> delegate( 489 scoped_ptr<SocketStreamEventRecorder> delegate(
481 new SocketStreamEventRecorder(test_callback.callback())); 490 new SocketStreamEventRecorder(test_callback.callback()));
482 delegate->SetOnStartOpenConnection(base::Bind( 491 delegate->SetOnStartOpenConnection(base::Bind(
483 &SocketStreamTest::DoSwitchToSpdyTest, base::Unretained(this))); 492 &SocketStreamTest::DoSwitchToSpdyTest, base::Unretained(this)));
484 493
485 MockHostResolver host_resolver;
486 TestURLRequestContext context; 494 TestURLRequestContext context;
487 495
488 scoped_refptr<SocketStream> socket_stream( 496 scoped_refptr<SocketStream> socket_stream(
489 new SocketStream(GURL("ws://example.com/demo"), delegate.get())); 497 new SocketStream(GURL("ws://example.com/demo"), delegate.get()));
490 498
491 socket_stream->set_context(&context); 499 socket_stream->set_context(&context);
492 socket_stream->SetHostResolver(&host_resolver);
493 500
494 socket_stream->Connect(); 501 socket_stream->Connect();
495 502
496 EXPECT_EQ(net::ERR_PROTOCOL_SWITCHED, test_callback.WaitForResult()); 503 EXPECT_EQ(net::ERR_PROTOCOL_SWITCHED, test_callback.WaitForResult());
497 504
498 const std::vector<SocketStreamEvent>& events = delegate->GetSeenEvents(); 505 const std::vector<SocketStreamEvent>& events = delegate->GetSeenEvents();
499 ASSERT_EQ(2U, events.size()); 506 ASSERT_EQ(2U, events.size());
500 507
501 EXPECT_EQ(SocketStreamEvent::EVENT_START_OPEN_CONNECTION, 508 EXPECT_EQ(SocketStreamEvent::EVENT_START_OPEN_CONNECTION,
502 events[0].event_type); 509 events[0].event_type);
503 EXPECT_EQ(SocketStreamEvent::EVENT_ERROR, events[1].event_type); 510 EXPECT_EQ(SocketStreamEvent::EVENT_ERROR, events[1].event_type);
504 EXPECT_EQ(net::ERR_PROTOCOL_SWITCHED, events[1].error_code); 511 EXPECT_EQ(net::ERR_PROTOCOL_SWITCHED, events[1].error_code);
505 } 512 }
506 513
507 TEST_F(SocketStreamTest, SwitchAfterPending) { 514 TEST_F(SocketStreamTest, SwitchAfterPending) {
508 TestCompletionCallback test_callback; 515 TestCompletionCallback test_callback;
509 516
510 scoped_ptr<SocketStreamEventRecorder> delegate( 517 scoped_ptr<SocketStreamEventRecorder> delegate(
511 new SocketStreamEventRecorder(test_callback.callback())); 518 new SocketStreamEventRecorder(test_callback.callback()));
512 delegate->SetOnStartOpenConnection(base::Bind( 519 delegate->SetOnStartOpenConnection(base::Bind(
513 &SocketStreamTest::DoIOPending, base::Unretained(this))); 520 &SocketStreamTest::DoIOPending, base::Unretained(this)));
514 521
515 MockHostResolver host_resolver;
516 TestURLRequestContext context; 522 TestURLRequestContext context;
517 523
518 scoped_refptr<SocketStream> socket_stream( 524 scoped_refptr<SocketStream> socket_stream(
519 new SocketStream(GURL("ws://example.com/demo"), delegate.get())); 525 new SocketStream(GURL("ws://example.com/demo"), delegate.get()));
520 526
521 socket_stream->set_context(&context); 527 socket_stream->set_context(&context);
522 socket_stream->SetHostResolver(&host_resolver);
523 528
524 socket_stream->Connect(); 529 socket_stream->Connect();
525 io_test_callback_.WaitForResult(); 530 io_test_callback_.WaitForResult();
526 EXPECT_EQ(net::SocketStream::STATE_RESOLVE_PROTOCOL_COMPLETE, 531 EXPECT_EQ(net::SocketStream::STATE_RESOLVE_PROTOCOL_COMPLETE,
527 socket_stream->next_state_); 532 socket_stream->next_state_);
528 delegate->CompleteConnection(net::ERR_PROTOCOL_SWITCHED); 533 delegate->CompleteConnection(net::ERR_PROTOCOL_SWITCHED);
529 534
530 EXPECT_EQ(net::ERR_PROTOCOL_SWITCHED, test_callback.WaitForResult()); 535 EXPECT_EQ(net::ERR_PROTOCOL_SWITCHED, test_callback.WaitForResult());
531 536
532 const std::vector<SocketStreamEvent>& events = delegate->GetSeenEvents(); 537 const std::vector<SocketStreamEvent>& events = delegate->GetSeenEvents();
(...skipping 22 matching lines...) Expand all
555 // server doesn't close the connection. 560 // server doesn't close the connection.
556 MockRead(ASYNC, ERR_IO_PENDING) 561 MockRead(ASYNC, ERR_IO_PENDING)
557 }; 562 };
558 StaticSocketDataProvider data(data_reads, arraysize(data_reads), 563 StaticSocketDataProvider data(data_reads, arraysize(data_reads),
559 data_writes, arraysize(data_writes)); 564 data_writes, arraysize(data_writes));
560 mock_socket_factory.AddSocketDataProvider(&data); 565 mock_socket_factory.AddSocketDataProvider(&data);
561 SSLSocketDataProvider ssl(SYNCHRONOUS, ERR_SSL_PROTOCOL_ERROR); 566 SSLSocketDataProvider ssl(SYNCHRONOUS, ERR_SSL_PROTOCOL_ERROR);
562 mock_socket_factory.AddSSLSocketDataProvider(&ssl); 567 mock_socket_factory.AddSSLSocketDataProvider(&ssl);
563 568
564 TestCompletionCallback test_callback; 569 TestCompletionCallback test_callback;
565 MockHostResolver host_resolver; 570 TestURLRequestContextWithProxy context("https://myproxy:70");
566 TestURLRequestContext context("https://myproxy:70");
567 571
568 scoped_ptr<SocketStreamEventRecorder> delegate( 572 scoped_ptr<SocketStreamEventRecorder> delegate(
569 new SocketStreamEventRecorder(test_callback.callback())); 573 new SocketStreamEventRecorder(test_callback.callback()));
570 delegate->SetOnConnected(base::Bind(&SocketStreamEventRecorder::DoClose, 574 delegate->SetOnConnected(base::Bind(&SocketStreamEventRecorder::DoClose,
571 base::Unretained(delegate.get()))); 575 base::Unretained(delegate.get())));
572 576
573 scoped_refptr<SocketStream> socket_stream( 577 scoped_refptr<SocketStream> socket_stream(
574 new SocketStream(GURL("ws://example.com/demo"), delegate.get())); 578 new SocketStream(GURL("ws://example.com/demo"), delegate.get()));
575 579
576 socket_stream->set_context(&context); 580 socket_stream->set_context(&context);
577 socket_stream->SetHostResolver(&host_resolver);
578 socket_stream->SetClientSocketFactory(&mock_socket_factory); 581 socket_stream->SetClientSocketFactory(&mock_socket_factory);
579 582
580 socket_stream->Connect(); 583 socket_stream->Connect();
581 584
582 test_callback.WaitForResult(); 585 test_callback.WaitForResult();
583 586
584 const std::vector<SocketStreamEvent>& events = delegate->GetSeenEvents(); 587 const std::vector<SocketStreamEvent>& events = delegate->GetSeenEvents();
585 ASSERT_EQ(3U, events.size()); 588 ASSERT_EQ(3U, events.size());
586 589
587 EXPECT_EQ(SocketStreamEvent::EVENT_START_OPEN_CONNECTION, 590 EXPECT_EQ(SocketStreamEvent::EVENT_START_OPEN_CONNECTION,
(...skipping 20 matching lines...) Expand all
608 // server doesn't close the connection. 611 // server doesn't close the connection.
609 MockRead(ASYNC, ERR_IO_PENDING) 612 MockRead(ASYNC, ERR_IO_PENDING)
610 }; 613 };
611 StaticSocketDataProvider data(data_reads, arraysize(data_reads), 614 StaticSocketDataProvider data(data_reads, arraysize(data_reads),
612 data_writes, arraysize(data_writes)); 615 data_writes, arraysize(data_writes));
613 mock_socket_factory.AddSocketDataProvider(&data); 616 mock_socket_factory.AddSocketDataProvider(&data);
614 SSLSocketDataProvider ssl(SYNCHRONOUS, OK); 617 SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
615 mock_socket_factory.AddSSLSocketDataProvider(&ssl); 618 mock_socket_factory.AddSSLSocketDataProvider(&ssl);
616 619
617 TestCompletionCallback test_callback; 620 TestCompletionCallback test_callback;
618 MockHostResolver host_resolver; 621 TestURLRequestContextWithProxy context("https://myproxy:70");
619 TestURLRequestContext context("https://myproxy:70");
620 622
621 scoped_ptr<SocketStreamEventRecorder> delegate( 623 scoped_ptr<SocketStreamEventRecorder> delegate(
622 new SocketStreamEventRecorder(test_callback.callback())); 624 new SocketStreamEventRecorder(test_callback.callback()));
623 delegate->SetOnConnected(base::Bind(&SocketStreamEventRecorder::DoClose, 625 delegate->SetOnConnected(base::Bind(&SocketStreamEventRecorder::DoClose,
624 base::Unretained(delegate.get()))); 626 base::Unretained(delegate.get())));
625 627
626 scoped_refptr<SocketStream> socket_stream( 628 scoped_refptr<SocketStream> socket_stream(
627 new SocketStream(GURL("ws://example.com/demo"), delegate.get())); 629 new SocketStream(GURL("ws://example.com/demo"), delegate.get()));
628 630
629 socket_stream->set_context(&context); 631 socket_stream->set_context(&context);
630 socket_stream->SetHostResolver(&host_resolver);
631 socket_stream->SetClientSocketFactory(&mock_socket_factory); 632 socket_stream->SetClientSocketFactory(&mock_socket_factory);
632 633
633 socket_stream->Connect(); 634 socket_stream->Connect();
634 635
635 test_callback.WaitForResult(); 636 test_callback.WaitForResult();
636 637
637 const std::vector<SocketStreamEvent>& events = delegate->GetSeenEvents(); 638 const std::vector<SocketStreamEvent>& events = delegate->GetSeenEvents();
638 ASSERT_EQ(4U, events.size()); 639 ASSERT_EQ(4U, events.size());
639 640
640 EXPECT_EQ(SocketStreamEvent::EVENT_START_OPEN_CONNECTION, 641 EXPECT_EQ(SocketStreamEvent::EVENT_START_OPEN_CONNECTION,
641 events[0].event_type); 642 events[0].event_type);
642 EXPECT_EQ(SocketStreamEvent::EVENT_CONNECTED, events[1].event_type); 643 EXPECT_EQ(SocketStreamEvent::EVENT_CONNECTED, events[1].event_type);
643 EXPECT_EQ(SocketStreamEvent::EVENT_ERROR, events[2].event_type); 644 EXPECT_EQ(SocketStreamEvent::EVENT_ERROR, events[2].event_type);
644 EXPECT_EQ(net::ERR_ABORTED, events[2].error_code); 645 EXPECT_EQ(net::ERR_ABORTED, events[2].error_code);
645 EXPECT_EQ(SocketStreamEvent::EVENT_CLOSE, events[3].event_type); 646 EXPECT_EQ(SocketStreamEvent::EVENT_CLOSE, events[3].event_type);
646 } 647 }
647 648
648 } // namespace net 649 } // namespace net
OLDNEW
« no previous file with comments | « net/socket_stream/socket_stream.cc ('k') | net/url_request/url_request_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698