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

Side by Side Diff: net/tools/quic/end_to_end_test.cc

Issue 14287009: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with Tot Created 7 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/quic/test_tools/simple_quic_framer.cc ('k') | net/tools/quic/quic_client.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 (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 <stddef.h> 5 #include <stddef.h>
6 #include <string> 6 #include <string>
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 void GenerateBody(string* body, int length) { 47 void GenerateBody(string* body, int length) {
48 body->clear(); 48 body->clear();
49 body->reserve(length); 49 body->reserve(length);
50 for (int i = 0; i < length; ++i) { 50 for (int i = 0; i < length; ++i) {
51 body->append(1, static_cast<char>(32 + i % (126 - 32))); 51 body->append(1, static_cast<char>(32 + i % (126 - 32)));
52 } 52 }
53 } 53 }
54 54
55 55
56 // Simple wrapper class to run GFE in a thread. 56 // Simple wrapper class to run server in a thread.
57 class ServerThread : public base::SimpleThread { 57 class ServerThread : public base::SimpleThread {
58 public: 58 public:
59 explicit ServerThread(IPEndPoint address) 59 explicit ServerThread(IPEndPoint address)
60 : SimpleThread("server_thread"), 60 : SimpleThread("server_thread"),
61 listening_(true, false), 61 listening_(true, false),
62 quit_(true, false), 62 quit_(true, false),
63 address_(address), 63 address_(address),
64 port_(0) { 64 port_(0) {
65 } 65 }
66 virtual ~ServerThread() { 66 virtual ~ServerThread() {
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 EXPECT_EQ(200ul, client_->response_headers()->parsed_response_code()); 522 EXPECT_EQ(200ul, client_->response_headers()->parsed_response_code());
523 client_->ResetConnection(); 523 client_->ResetConnection();
524 EXPECT_EQ(kBarResponseBody, client_->SendSynchronousRequest("/bar")); 524 EXPECT_EQ(kBarResponseBody, client_->SendSynchronousRequest("/bar"));
525 EXPECT_EQ(200ul, client_->response_headers()->parsed_response_code()); 525 EXPECT_EQ(200ul, client_->response_headers()->parsed_response_code());
526 } 526 }
527 527
528 } // namespace 528 } // namespace
529 } // namespace test 529 } // namespace test
530 } // namespace tools 530 } // namespace tools
531 } // namespace net 531 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/simple_quic_framer.cc ('k') | net/tools/quic/quic_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698