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

Side by Side Diff: net/url_request/url_fetcher_impl_unittest.cc

Issue 1882433002: Removing NSS files and USE_OPENSSL flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 8 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
« no previous file with comments | « net/third_party/nss/ssl/win32err.c ('k') | net/url_request/url_request_unittest.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 "net/url_request/url_fetcher_impl.h" 5 #include "net/url_request/url_fetcher_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 27 matching lines...) Expand all
38 #include "net/base/upload_file_element_reader.h" 38 #include "net/base/upload_file_element_reader.h"
39 #include "net/dns/mock_host_resolver.h" 39 #include "net/dns/mock_host_resolver.h"
40 #include "net/http/http_response_headers.h" 40 #include "net/http/http_response_headers.h"
41 #include "net/test/embedded_test_server/embedded_test_server.h" 41 #include "net/test/embedded_test_server/embedded_test_server.h"
42 #include "net/url_request/url_fetcher_delegate.h" 42 #include "net/url_request/url_fetcher_delegate.h"
43 #include "net/url_request/url_request_context_getter.h" 43 #include "net/url_request/url_request_context_getter.h"
44 #include "net/url_request/url_request_test_util.h" 44 #include "net/url_request/url_request_test_util.h"
45 #include "net/url_request/url_request_throttler_manager.h" 45 #include "net/url_request/url_request_throttler_manager.h"
46 #include "testing/gtest/include/gtest/gtest.h" 46 #include "testing/gtest/include/gtest/gtest.h"
47 47
48 #if defined(USE_NSS_VERIFIER) 48 #if defined(USE_NSS_CERTS)
49 #include "net/cert_net/nss_ocsp.h" 49 #include "net/cert_net/nss_ocsp.h"
50 #endif 50 #endif
51 51
52 namespace net { 52 namespace net {
53 53
54 using base::Time; 54 using base::Time;
55 using base::TimeDelta; 55 using base::TimeDelta;
56 56
57 // TODO(eroman): Add a regression test for http://crbug.com/40505. 57 // TODO(eroman): Add a regression test for http://crbug.com/40505.
58 58
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 void SetUp() override { 418 void SetUp() override {
419 SetUpServer(); 419 SetUpServer();
420 ASSERT_TRUE(test_server_->Start()); 420 ASSERT_TRUE(test_server_->Start());
421 421
422 // URL that will hang when lookups reach the host resolver. 422 // URL that will hang when lookups reach the host resolver.
423 hanging_url_ = GURL(base::StringPrintf( 423 hanging_url_ = GURL(base::StringPrintf(
424 "http://example.com:%d%s", test_server_->host_port_pair().port(), 424 "http://example.com:%d%s", test_server_->host_port_pair().port(),
425 kDefaultResponsePath)); 425 kDefaultResponsePath));
426 ASSERT_TRUE(hanging_url_.is_valid()); 426 ASSERT_TRUE(hanging_url_.is_valid());
427 427
428 #if defined(USE_NSS_VERIFIER) 428 #if defined(USE_NSS_CERTS)
429 crypto::EnsureNSSInit(); 429 crypto::EnsureNSSInit();
430 EnsureNSSHttpIOInit(); 430 EnsureNSSHttpIOInit();
431 #endif 431 #endif
432 } 432 }
433 433
434 void TearDown() override { 434 void TearDown() override {
435 #if defined(USE_NSS_VERIFIER) 435 #if defined(USE_NSS_CERTS)
436 ShutdownNSSHttpIO(); 436 ShutdownNSSHttpIO();
437 #endif 437 #endif
438 } 438 }
439 439
440 // Initializes |test_server_| without starting it. Allows subclasses to use 440 // Initializes |test_server_| without starting it. Allows subclasses to use
441 // their own server configuration. 441 // their own server configuration.
442 virtual void SetUpServer() { 442 virtual void SetUpServer() {
443 test_server_.reset(new EmbeddedTestServer); 443 test_server_.reset(new EmbeddedTestServer);
444 test_server_->AddDefaultHandlers(base::FilePath(kDocRoot)); 444 test_server_->AddDefaultHandlers(base::FilePath(kDocRoot));
445 } 445 }
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 EXPECT_EQ(-1, delegate.fetcher()->GetResponseCode()); 1523 EXPECT_EQ(-1, delegate.fetcher()->GetResponseCode());
1524 EXPECT_TRUE(delegate.fetcher()->GetCookies().empty()); 1524 EXPECT_TRUE(delegate.fetcher()->GetCookies().empty());
1525 std::string data; 1525 std::string data;
1526 EXPECT_TRUE(delegate.fetcher()->GetResponseAsString(&data)); 1526 EXPECT_TRUE(delegate.fetcher()->GetResponseAsString(&data));
1527 EXPECT_TRUE(data.empty()); 1527 EXPECT_TRUE(data.empty());
1528 } 1528 }
1529 1529
1530 } // namespace 1530 } // namespace
1531 1531
1532 } // namespace net 1532 } // namespace net
OLDNEW
« no previous file with comments | « net/third_party/nss/ssl/win32err.c ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698