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

Side by Side Diff: net/socket/deterministic_socket_data_unittest.cc

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 "net/socket/socket_test_util.h" 5 #include "net/socket/socket_test_util.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "testing/platform_test.h" 10 #include "testing/platform_test.h"
(...skipping 11 matching lines...) Expand all
22 static const int kLen3 = arraysize(kMsg3); 22 static const int kLen3 = arraysize(kMsg3);
23 23
24 } // anonymous namespace 24 } // anonymous namespace
25 25
26 namespace net { 26 namespace net {
27 27
28 class DeterministicSocketDataTest : public PlatformTest { 28 class DeterministicSocketDataTest : public PlatformTest {
29 public: 29 public:
30 DeterministicSocketDataTest(); 30 DeterministicSocketDataTest();
31 31
32 virtual void TearDown(); 32 void TearDown() override;
33 33
34 void ReentrantReadCallback(int len, int rv); 34 void ReentrantReadCallback(int len, int rv);
35 void ReentrantWriteCallback(const char* data, int len, int rv); 35 void ReentrantWriteCallback(const char* data, int len, int rv);
36 36
37 protected: 37 protected:
38 void Initialize(MockRead* reads, size_t reads_count, MockWrite* writes, 38 void Initialize(MockRead* reads, size_t reads_count, MockWrite* writes,
39 size_t writes_count); 39 size_t writes_count);
40 40
41 void AssertSyncReadEquals(const char* data, int len); 41 void AssertSyncReadEquals(const char* data, int len);
42 void AssertAsyncReadEquals(const char* data, int len); 42 void AssertAsyncReadEquals(const char* data, int len);
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 data_->StopAfter(1); 613 data_->StopAfter(1);
614 AssertSyncWriteEquals(kMsg3, kLen3); 614 AssertSyncWriteEquals(kMsg3, kLen3);
615 615
616 data_->RunFor(1); 616 data_->RunFor(1);
617 ASSERT_TRUE(read_callback_.have_result()); 617 ASSERT_TRUE(read_callback_.have_result());
618 ASSERT_EQ(kLen2, read_callback_.WaitForResult()); 618 ASSERT_EQ(kLen2, read_callback_.WaitForResult());
619 AssertReadBufferEquals(kMsg2, kLen2); 619 AssertReadBufferEquals(kMsg2, kLen2);
620 } 620 }
621 621
622 } // namespace net 622 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_base_unittest.cc ('k') | net/socket/socks5_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698