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

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

Issue 766463002: Revert of Remove SSLClientAuthHandler's RDH dependency. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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,
235 net::SSLCertRequestInfo* cert_request_info, 236 net::SSLCertRequestInfo* cert_request_info,
236 const base::Callback<void(net::X509Certificate*)>& callback) override { 237 const base::Callback<void(net::X509Certificate*)>& callback) override {
237 ++call_count_; 238 ++call_count_;
238 passed_certs_ = cert_request_info->client_certs; 239 passed_certs_ = cert_request_info->client_certs;
239 } 240 }
240 241
241 int call_count() { 242 int call_count() {
242 return call_count_; 243 return call_count_;
243 } 244 }
244 245
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 ASSERT_TRUE(base::ReadFileToString(temp_path(), &contents)); 722 ASSERT_TRUE(base::ReadFileToString(temp_path(), &contents));
722 EXPECT_EQ(test_data(), contents); 723 EXPECT_EQ(test_data(), contents);
723 724
724 // Release the loader. The file should be gone now. 725 // Release the loader. The file should be gone now.
725 ReleaseLoader(); 726 ReleaseLoader();
726 base::RunLoop().RunUntilIdle(); 727 base::RunLoop().RunUntilIdle();
727 EXPECT_FALSE(base::PathExists(temp_path())); 728 EXPECT_FALSE(base::PathExists(temp_path()));
728 } 729 }
729 730
730 } // namespace content 731 } // 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