| OLD | NEW |
| 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 "chrome/browser/net/http_pipelining_compatibility_client.h" | 5 #include "chrome/browser/net/http_pipelining_compatibility_client.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 FIELD_NETWORK_ERROR, | 41 FIELD_NETWORK_ERROR, |
| 42 FIELD_RESPONSE_CODE, | 42 FIELD_RESPONSE_CODE, |
| 43 FIELD_STATUS, | 43 FIELD_STATUS, |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 class HttpPipeliningCompatibilityClientTest : public testing::Test { | 46 class HttpPipeliningCompatibilityClientTest : public testing::Test { |
| 47 public: | 47 public: |
| 48 HttpPipeliningCompatibilityClientTest() | 48 HttpPipeliningCompatibilityClientTest() |
| 49 : test_server_( | 49 : test_server_( |
| 50 net::TestServer::TYPE_HTTP, | 50 net::TestServer::TYPE_HTTP, |
| 51 net::TestServer::kLocalhost, |
| 51 FilePath(FILE_PATH_LITERAL("chrome/test/data/http_pipelining"))), | 52 FilePath(FILE_PATH_LITERAL("chrome/test/data/http_pipelining"))), |
| 52 io_thread_(content::BrowserThread::IO, &message_loop_) { | 53 io_thread_(content::BrowserThread::IO, &message_loop_) { |
| 53 } | 54 } |
| 54 | 55 |
| 55 protected: | 56 protected: |
| 56 virtual void SetUp() OVERRIDE { | 57 virtual void SetUp() OVERRIDE { |
| 57 ASSERT_TRUE(test_server_.Start()); | 58 ASSERT_TRUE(test_server_.Start()); |
| 58 context_ = new TestURLRequestContextGetter; | 59 context_ = new TestURLRequestContextGetter; |
| 59 context_->AddRef(); | 60 context_->AddRef(); |
| 60 | 61 |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 | 434 |
| 434 base::Histogram::SampleSet response_sample3 = | 435 base::Histogram::SampleSet response_sample3 = |
| 435 GetHistogramValue(2, FIELD_RESPONSE_CODE); | 436 GetHistogramValue(2, FIELD_RESPONSE_CODE); |
| 436 EXPECT_EQ(1, response_sample3.TotalCount()); | 437 EXPECT_EQ(1, response_sample3.TotalCount()); |
| 437 EXPECT_EQ(1, response_sample3.counts(401)); | 438 EXPECT_EQ(1, response_sample3.counts(401)); |
| 438 } | 439 } |
| 439 | 440 |
| 440 } // anonymous namespace | 441 } // anonymous namespace |
| 441 | 442 |
| 442 } // namespace chrome_browser_net | 443 } // namespace chrome_browser_net |
| OLD | NEW |