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

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

Issue 1082123003: Rename USE_NSS to USE_NSS_CERTS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use-nss-certs
Patch Set: long line Created 5 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
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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 15 matching lines...) Expand all
26 #include "net/base/upload_file_element_reader.h" 26 #include "net/base/upload_file_element_reader.h"
27 #include "net/dns/mock_host_resolver.h" 27 #include "net/dns/mock_host_resolver.h"
28 #include "net/http/http_response_headers.h" 28 #include "net/http/http_response_headers.h"
29 #include "net/test/spawned_test_server/spawned_test_server.h" 29 #include "net/test/spawned_test_server/spawned_test_server.h"
30 #include "net/url_request/url_fetcher_delegate.h" 30 #include "net/url_request/url_fetcher_delegate.h"
31 #include "net/url_request/url_request_context_getter.h" 31 #include "net/url_request/url_request_context_getter.h"
32 #include "net/url_request/url_request_test_util.h" 32 #include "net/url_request/url_request_test_util.h"
33 #include "net/url_request/url_request_throttler_manager.h" 33 #include "net/url_request/url_request_throttler_manager.h"
34 #include "testing/gtest/include/gtest/gtest.h" 34 #include "testing/gtest/include/gtest/gtest.h"
35 35
36 #if defined(USE_NSS) || defined(OS_IOS) 36 #if defined(USE_NSS_CERTS) || defined(OS_IOS)
37 #include "net/cert_net/nss_ocsp.h" 37 #include "net/cert_net/nss_ocsp.h"
38 #endif 38 #endif
39 39
40 namespace net { 40 namespace net {
41 41
42 using base::Time; 42 using base::Time;
43 using base::TimeDelta; 43 using base::TimeDelta;
44 44
45 // TODO(eroman): Add a regression test for http://crbug.com/40505. 45 // TODO(eroman): Add a regression test for http://crbug.com/40505.
46 46
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 179 }
180 180
181 protected: 181 protected:
182 // testing::Test: 182 // testing::Test:
183 void SetUp() override { 183 void SetUp() override {
184 SetUpServer(); 184 SetUpServer();
185 ASSERT_TRUE(test_server_->Start()); 185 ASSERT_TRUE(test_server_->Start());
186 186
187 context_.reset(new ThrottlingTestURLRequestContext()); 187 context_.reset(new ThrottlingTestURLRequestContext());
188 188
189 #if defined(USE_NSS) || defined(OS_IOS) 189 #if defined(USE_NSS_CERTS) || defined(OS_IOS)
190 crypto::EnsureNSSInit(); 190 crypto::EnsureNSSInit();
191 EnsureNSSHttpIOInit(); 191 EnsureNSSHttpIOInit();
192 #endif 192 #endif
193 } 193 }
194 194
195 void TearDown() override { 195 void TearDown() override {
196 #if defined(USE_NSS) || defined(OS_IOS) 196 #if defined(USE_NSS_CERTS) || defined(OS_IOS)
197 ShutdownNSSHttpIO(); 197 ShutdownNSSHttpIO();
198 #endif 198 #endif
199 } 199 }
200 200
201 // Initializes |test_server_| without starting it. Allows subclasses to use 201 // Initializes |test_server_| without starting it. Allows subclasses to use
202 // their own server configuration. 202 // their own server configuration.
203 virtual void SetUpServer() { 203 virtual void SetUpServer() {
204 test_server_.reset(new SpawnedTestServer(SpawnedTestServer::TYPE_HTTP, 204 test_server_.reset(new SpawnedTestServer(SpawnedTestServer::TYPE_HTTP,
205 SpawnedTestServer::kLocalhost, 205 SpawnedTestServer::kLocalhost,
206 base::FilePath(kDocRoot))); 206 base::FilePath(kDocRoot)));
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 1333
1334 base::MessageLoop::current()->RunUntilIdle(); 1334 base::MessageLoop::current()->RunUntilIdle();
1335 ASSERT_EQ(kTake[i], base::PathExists(file_path_)) << 1335 ASSERT_EQ(kTake[i], base::PathExists(file_path_)) <<
1336 "FilePath: " << file_path_.value(); 1336 "FilePath: " << file_path_.value();
1337 } 1337 }
1338 } 1338 }
1339 1339
1340 } // namespace 1340 } // namespace
1341 1341
1342 } // namespace net 1342 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698