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 #ifndef IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_STATE_DELEGATE_H_ | 5 #ifndef IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_STATE_DELEGATE_H_ |
6 #define IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_STATE_DELEGATE_H_ | 6 #define IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_STATE_DELEGATE_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // called. | 58 // called. |
59 bool get_java_script_dialog_presenter_called() const { | 59 bool get_java_script_dialog_presenter_called() const { |
60 return get_java_script_dialog_presenter_called_; | 60 return get_java_script_dialog_presenter_called_; |
61 } | 61 } |
62 | 62 |
63 // Returns the last HTTP Authentication request passed to |OnAuthRequired|. | 63 // Returns the last HTTP Authentication request passed to |OnAuthRequired|. |
64 TestAuthenticationRequest* last_authentication_request() const { | 64 TestAuthenticationRequest* last_authentication_request() const { |
65 return last_authentication_request_.get(); | 65 return last_authentication_request_.get(); |
66 } | 66 } |
67 | 67 |
| 68 // Clears the last HTTP Authentication request passed to |OnAuthRequired|. |
| 69 void ClearLastAuthenticationRequest() { |
| 70 last_authentication_request_.reset(); |
| 71 } |
| 72 |
68 private: | 73 private: |
69 bool load_progress_changed_called_ = false; | 74 bool load_progress_changed_called_ = false; |
70 bool handle_context_menu_called_ = false; | 75 bool handle_context_menu_called_ = false; |
71 bool get_java_script_dialog_presenter_called_ = false; | 76 bool get_java_script_dialog_presenter_called_ = false; |
72 TestJavaScriptDialogPresenter java_script_dialog_presenter_; | 77 TestJavaScriptDialogPresenter java_script_dialog_presenter_; |
73 std::unique_ptr<TestAuthenticationRequest> last_authentication_request_; | 78 std::unique_ptr<TestAuthenticationRequest> last_authentication_request_; |
74 }; | 79 }; |
75 | 80 |
76 } // namespace web | 81 } // namespace web |
77 | 82 |
78 #endif // IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_STATE_DELEGATE_H_ | 83 #endif // IOS_WEB_PUBLIC_TEST_FAKES_TEST_WEB_STATE_DELEGATE_H_ |
OLD | NEW |