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

Unified Diff: ios/web/public/test/fakes/test_web_state_delegate.mm

Issue 2615093004: [ios] Made TestWebStateDelegate and TestJavaScriptDialogPresenter reusable. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/public/test/fakes/test_web_state_delegate.h ('k') | ios/web/web_state/web_state_impl_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/test/fakes/test_web_state_delegate.mm
diff --git a/ios/web/public/test/fakes/test_web_state_delegate.mm b/ios/web/public/test/fakes/test_web_state_delegate.mm
new file mode 100644
index 0000000000000000000000000000000000000000..3792e05266f80e65866c8cc2048ad78ea7109b64
--- /dev/null
+++ b/ios/web/public/test/fakes/test_web_state_delegate.mm
@@ -0,0 +1,30 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "ios/web/public/test/fakes/test_web_state_delegate.h"
+
+namespace web {
+
+JavaScriptDialogPresenter* TestWebStateDelegate::GetJavaScriptDialogPresenter(
+ WebState*) {
+ get_java_script_dialog_presenter_called_ = true;
+ return &java_script_dialog_presenter_;
+}
+
+void TestWebStateDelegate::LoadProgressChanged(WebState*, double) {
+ load_progress_changed_called_ = true;
+}
+
+bool TestWebStateDelegate::HandleContextMenu(WebState*,
+ const ContextMenuParams&) {
+ handle_context_menu_called_ = true;
+ return NO;
+}
+
+TestJavaScriptDialogPresenter*
+TestWebStateDelegate::GetTestJavaScriptDialogPresenter() {
+ return &java_script_dialog_presenter_;
+}
+
+} // namespace web
« no previous file with comments | « ios/web/public/test/fakes/test_web_state_delegate.h ('k') | ios/web/web_state/web_state_impl_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698