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

Side by Side Diff: content/browser/loader/resource_loader_unittest.cc

Issue 596873002: Remove SSLClientAuthHandler's RDH dependency. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/browser/loader/resource_loader.h" 5 #include "content/browser/loader/resource_loader.h"
6 6
7 #include "base/files/file.h" 7 #include "base/files/file.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 // Test browser client that captures calls to SelectClientCertificates and 226 // Test browser client that captures calls to SelectClientCertificates and
227 // records the arguments of the most recent call for later inspection. 227 // records the arguments of the most recent call for later inspection.
228 class SelectCertificateBrowserClient : public TestContentBrowserClient { 228 class SelectCertificateBrowserClient : public TestContentBrowserClient {
229 public: 229 public:
230 SelectCertificateBrowserClient() : call_count_(0) {} 230 SelectCertificateBrowserClient() : call_count_(0) {}
231 231
232 virtual void SelectClientCertificate( 232 virtual void SelectClientCertificate(
233 int render_process_id, 233 int render_process_id,
234 int render_view_id, 234 int render_view_id,
235 const net::HttpNetworkSession* network_session,
236 net::SSLCertRequestInfo* cert_request_info, 235 net::SSLCertRequestInfo* cert_request_info,
237 const base::Callback<void(net::X509Certificate*)>& callback) override { 236 const base::Callback<void(net::X509Certificate*)>& callback) override {
238 ++call_count_; 237 ++call_count_;
239 passed_certs_ = cert_request_info->client_certs; 238 passed_certs_ = cert_request_info->client_certs;
240 } 239 }
241 240
242 int call_count() { 241 int call_count() {
243 return call_count_; 242 return call_count_;
244 } 243 }
245 244
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 ASSERT_TRUE(base::ReadFileToString(temp_path(), &contents)); 721 ASSERT_TRUE(base::ReadFileToString(temp_path(), &contents));
723 EXPECT_EQ(test_data(), contents); 722 EXPECT_EQ(test_data(), contents);
724 723
725 // Release the loader. The file should be gone now. 724 // Release the loader. The file should be gone now.
726 ReleaseLoader(); 725 ReleaseLoader();
727 base::RunLoop().RunUntilIdle(); 726 base::RunLoop().RunUntilIdle();
728 EXPECT_FALSE(base::PathExists(temp_path())); 727 EXPECT_FALSE(base::PathExists(temp_path()));
729 } 728 }
730 729
731 } // namespace content 730 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_loader.cc ('k') | content/browser/ssl/ssl_client_auth_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698