| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |