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

Side by Side Diff: chrome/browser/ui/views/ssl_client_certificate_selector_browsertest.cc

Issue 10559036: Added URLRequestContext to constructor for URLRequest. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated unittests Created 8 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ssl/ssl_client_auth_requestor_mock.h" 9 #include "chrome/browser/ssl/ssl_client_auth_requestor_mock.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 virtual void CleanUpOnIOThread() { 97 virtual void CleanUpOnIOThread() {
98 delete url_request_; 98 delete url_request_;
99 99
100 io_loop_finished_event_.Signal(); 100 io_loop_finished_event_.Signal();
101 } 101 }
102 102
103 protected: 103 protected:
104 net::URLRequest* MakeURLRequest( 104 net::URLRequest* MakeURLRequest(
105 net::URLRequestContextGetter* context_getter) { 105 net::URLRequestContextGetter* context_getter) {
106 net::URLRequest* request = new net::URLRequest(GURL("https://example"), 106 net::URLRequest* request = new net::URLRequest(
107 NULL); 107 GURL("https://example"),
108 request->set_context(context_getter->GetURLRequestContext()); 108 NULL,
109 context_getter->GetURLRequestContext());
109 return request; 110 return request;
110 } 111 }
111 112
112 base::WaitableEvent io_loop_finished_event_; 113 base::WaitableEvent io_loop_finished_event_;
113 114
114 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; 115 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
115 net::URLRequest* url_request_; 116 net::URLRequest* url_request_;
116 117
117 scoped_refptr<net::X509Certificate> mit_davidben_cert_; 118 scoped_refptr<net::X509Certificate> mit_davidben_cert_;
118 scoped_refptr<net::X509Certificate> foaf_me_chromium_test_cert_; 119 scoped_refptr<net::X509Certificate> foaf_me_chromium_test_cert_;
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 EXPECT_TRUE(ui_test_utils::SendKeyPressSync( 366 EXPECT_TRUE(ui_test_utils::SendKeyPressSync(
366 browser_1_, ui::VKEY_RETURN, false, false, false, false)); 367 browser_1_, ui::VKEY_RETURN, false, false, false, false));
367 368
368 Mock::VerifyAndClear(auth_requestor_.get()); 369 Mock::VerifyAndClear(auth_requestor_.get());
369 Mock::VerifyAndClear(auth_requestor_1_.get()); 370 Mock::VerifyAndClear(auth_requestor_1_.get());
370 371
371 // Now let the default selection for auth_requestor_ mock get checked on 372 // Now let the default selection for auth_requestor_ mock get checked on
372 // destruction. 373 // destruction.
373 EXPECT_CALL(*auth_requestor_, CertificateSelected(NULL)); 374 EXPECT_CALL(*auth_requestor_, CertificateSelected(NULL));
374 } 375 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698