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

Unified Diff: net/quic/quic_end_to_end_unittest.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: net/quic/quic_end_to_end_unittest.cc
diff --git a/net/quic/quic_end_to_end_unittest.cc b/net/quic/quic_end_to_end_unittest.cc
index 3e493e10b2991549b0ad235445ad1d1a3b0eeb52..b64ca50e8e61f8e6ce8c2837b220a46e220eb114 100644
--- a/net/quic/quic_end_to_end_unittest.cc
+++ b/net/quic/quic_end_to_end_unittest.cc
@@ -46,8 +46,7 @@ class TestTransactionFactory : public HttpTransactionFactory {
TestTransactionFactory(const HttpNetworkSession::Params& params)
: session_(new HttpNetworkSession(params)) {}
- virtual ~TestTransactionFactory() {
- }
+ virtual ~TestTransactionFactory() {}
// HttpTransactionFactory methods
virtual int CreateTransaction(RequestPriority priority,
@@ -56,9 +55,7 @@ class TestTransactionFactory : public HttpTransactionFactory {
return OK;
}
- virtual HttpCache* GetCache() OVERRIDE {
- return NULL;
- }
+ virtual HttpCache* GetCache() OVERRIDE { return NULL; }
virtual HttpNetworkSession* GetSession() OVERRIDE {
return session_;
@@ -111,7 +108,7 @@ class QuicEndToEndTest : public PlatformTest {
// Use a mapped host resolver so that request for www.google.com (port 80)
// reach the server running on localhost.
std::string map_rule = "MAP www.google.com www.google.com:" +
- base::IntToString(server_thread_->GetPort());
+ base::IntToString(server_thread_->GetPort());
EXPECT_TRUE(host_resolver_.AddRuleFromString(map_rule));
// To simplify the test, and avoid the race with the HTTP request, we force
@@ -133,13 +130,14 @@ class QuicEndToEndTest : public PlatformTest {
CHECK(net::ParseIPLiteralToNumber("127.0.0.1", &ip));
server_address_ = IPEndPoint(ip, 0);
server_config_.SetDefaults();
- server_thread_.reset(new ServerThread(server_address_, server_config_,
+ server_thread_.reset(new ServerThread(server_address_,
+ server_config_,
QuicSupportedVersions(),
strike_register_no_startup_period_,
kInitialFlowControlWindowForTest));
server_thread_->Initialize();
- server_address_ = IPEndPoint(server_address_.address(),
- server_thread_->GetPort());
+ server_address_ =
+ IPEndPoint(server_address_.address(), server_thread_->GetPort());
server_thread_->Start();
server_started_ = true;
}
@@ -180,9 +178,8 @@ class QuicEndToEndTest : public PlatformTest {
void InitializePostRequest(size_t length) {
GenerateBody(length);
ScopedVector<UploadElementReader> element_readers;
- element_readers.push_back(
- new UploadBytesElementReader(request_body_.data(),
- request_body_.length()));
+ element_readers.push_back(new UploadBytesElementReader(
+ request_body_.data(), request_body_.length()));
upload_data_stream_.reset(new UploadDataStream(element_readers.Pass(), 0));
request_.method = "POST";
request_.url = GURL("http://www.google.com/");
@@ -196,8 +193,7 @@ class QuicEndToEndTest : public PlatformTest {
const std::string& body) {
ASSERT_TRUE(consumer.is_done());
EXPECT_EQ(OK, consumer.error());
- EXPECT_EQ(status_line,
- consumer.response_info()->headers->GetStatusLine());
+ EXPECT_EQ(status_line, consumer.response_info()->headers->GetStatusLine());
EXPECT_EQ(body, consumer.content());
}
@@ -225,9 +221,7 @@ class QuicEndToEndTest : public PlatformTest {
TEST_F(QuicEndToEndTest, LargeGetWithNoPacketLoss) {
std::string response(10 * 1024, 'x');
- AddToCache("GET", request_.url.spec(),
- "HTTP/1.1", "200", "OK",
- response);
+ AddToCache("GET", request_.url.spec(), "HTTP/1.1", "200", "OK", response);
TestTransactionConsumer consumer(DEFAULT_PRIORITY,
transaction_factory_.get());
@@ -243,9 +237,8 @@ TEST_F(QuicEndToEndTest, LargeGetWithNoPacketLoss) {
TEST_F(QuicEndToEndTest, DISABLED_LargePostWithNoPacketLoss) {
InitializePostRequest(10 * 1024 * 1024);
- AddToCache("POST", request_.url.spec(),
- "HTTP/1.1", "200", "OK",
- kResponseBody);
+ AddToCache(
+ "POST", request_.url.spec(), "HTTP/1.1", "200", "OK", kResponseBody);
TestTransactionConsumer consumer(DEFAULT_PRIORITY,
transaction_factory_.get());
@@ -262,9 +255,8 @@ TEST_F(QuicEndToEndTest, LargePostWithPacketLoss) {
InitializePostRequest(1024 * 1024);
const char kResponseBody[] = "some really big response body";
- AddToCache("POST", request_.url.spec(),
- "HTTP/1.1", "200", "OK",
- kResponseBody);
+ AddToCache(
+ "POST", request_.url.spec(), "HTTP/1.1", "200", "OK", kResponseBody);
TestTransactionConsumer consumer(DEFAULT_PRIORITY,
transaction_factory_.get());
@@ -280,18 +272,16 @@ TEST_F(QuicEndToEndTest, UberTest) {
// FLAGS_fake_packet_loss_percentage = 30;
const char kResponseBody[] = "some really big response body";
- AddToCache("GET", request_.url.spec(),
- "HTTP/1.1", "200", "OK",
- kResponseBody);
+ AddToCache(
+ "GET", request_.url.spec(), "HTTP/1.1", "200", "OK", kResponseBody);
std::vector<TestTransactionConsumer*> consumers;
size_t num_requests = 100;
for (size_t i = 0; i < num_requests; ++i) {
- TestTransactionConsumer* consumer =
- new TestTransactionConsumer(DEFAULT_PRIORITY,
- transaction_factory_.get());
- consumers.push_back(consumer);
- consumer->Start(&request_, BoundNetLog());
+ TestTransactionConsumer* consumer = new TestTransactionConsumer(
+ DEFAULT_PRIORITY, transaction_factory_.get());
+ consumers.push_back(consumer);
+ consumer->Start(&request_, BoundNetLog());
}
// Will terminate when the last consumer completes.

Powered by Google App Engine
This is Rietveld 408576698