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

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

Issue 374033002: Fixes for re-enabling more MSVC level 4 warnings: net/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comment Created 6 years, 5 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/http/transport_security_persister.cc ('k') | net/tools/quic/quic_spdy_server_stream.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/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"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 //----------------------------------------------------------------------------- 13 //-----------------------------------------------------------------------------
14 14
15 namespace { 15 namespace {
16 16
17 static const char kMsg1[] = "\0hello!\xff"; 17 static const char kMsg1[] = "\0hello!\xff";
18 static const int kLen1 = arraysize(kMsg1); 18 static const int kLen1 = arraysize(kMsg1);
19 static const char kMsg2[] = "\012345678\0"; 19 static const char kMsg2[] = "\0a2345678\0";
20 static const int kLen2 = arraysize(kMsg2); 20 static const int kLen2 = arraysize(kMsg2);
21 static const char kMsg3[] = "bye!"; 21 static const char kMsg3[] = "bye!";
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:
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 data_->StopAfter(1); 611 data_->StopAfter(1);
612 AssertSyncWriteEquals(kMsg3, kLen3); 612 AssertSyncWriteEquals(kMsg3, kLen3);
613 613
614 data_->RunFor(1); 614 data_->RunFor(1);
615 ASSERT_TRUE(read_callback_.have_result()); 615 ASSERT_TRUE(read_callback_.have_result());
616 ASSERT_EQ(kLen2, read_callback_.WaitForResult()); 616 ASSERT_EQ(kLen2, read_callback_.WaitForResult());
617 AssertReadBufferEquals(kMsg2, kLen2); 617 AssertReadBufferEquals(kMsg2, kLen2);
618 } 618 }
619 619
620 } // namespace net 620 } // namespace net
OLDNEW
« no previous file with comments | « net/http/transport_security_persister.cc ('k') | net/tools/quic/quic_spdy_server_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698