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

Side by Side Diff: ios/web/public/test/fakes/test_web_state_delegate.mm

Issue 2644223002: Integration tests for WebStateDelegate::OnAuthRequired callback. (Closed)
Patch Set: Addressed review comments Created 3 years, 11 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 | « ios/web/public/test/fakes/test_web_state_delegate.h ('k') | ios/web/public/test/http_server.h » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #import "ios/web/public/test/fakes/test_web_state_delegate.h" 5 #import "ios/web/public/test/fakes/test_web_state_delegate.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 8
9 namespace web { 9 namespace web {
10 10
11 TestAuthenticationRequest::TestAuthenticationRequest() {} 11 TestAuthenticationRequest::TestAuthenticationRequest() {}
12 12
13 TestAuthenticationRequest::~TestAuthenticationRequest() = default; 13 TestAuthenticationRequest::~TestAuthenticationRequest() = default;
14 14
15 TestAuthenticationRequest::TestAuthenticationRequest(
16 const TestAuthenticationRequest&) = default;
17
15 TestWebStateDelegate::TestWebStateDelegate() {} 18 TestWebStateDelegate::TestWebStateDelegate() {}
16 19
17 TestWebStateDelegate::~TestWebStateDelegate() = default; 20 TestWebStateDelegate::~TestWebStateDelegate() = default;
18 21
19 JavaScriptDialogPresenter* TestWebStateDelegate::GetJavaScriptDialogPresenter( 22 JavaScriptDialogPresenter* TestWebStateDelegate::GetJavaScriptDialogPresenter(
20 WebState*) { 23 WebState*) {
21 get_java_script_dialog_presenter_called_ = true; 24 get_java_script_dialog_presenter_called_ = true;
22 return &java_script_dialog_presenter_; 25 return &java_script_dialog_presenter_;
23 } 26 }
24 27
(...skipping 19 matching lines...) Expand all
44 const AuthCallback& callback) { 47 const AuthCallback& callback) {
45 last_authentication_request_ = base::MakeUnique<TestAuthenticationRequest>(); 48 last_authentication_request_ = base::MakeUnique<TestAuthenticationRequest>();
46 last_authentication_request_->web_state = source; 49 last_authentication_request_->web_state = source;
47 last_authentication_request_->protection_space.reset( 50 last_authentication_request_->protection_space.reset(
48 [protection_space retain]); 51 [protection_space retain]);
49 last_authentication_request_->credential.reset([credential retain]); 52 last_authentication_request_->credential.reset([credential retain]);
50 last_authentication_request_->auth_callback = callback; 53 last_authentication_request_->auth_callback = callback;
51 } 54 }
52 55
53 } // namespace web 56 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/public/test/fakes/test_web_state_delegate.h ('k') | ios/web/public/test/http_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698