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

Unified Diff: ios/shared/chrome/browser/ui/toolbar/toolbar_test_util.mm

Issue 2818573002: Add Toolbar test utility classes. (Closed)
Patch Set: Created 3 years, 8 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/shared/chrome/browser/ui/toolbar/toolbar_test_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/shared/chrome/browser/ui/toolbar/toolbar_test_util.mm
diff --git a/ios/shared/chrome/browser/ui/toolbar/toolbar_test_util.mm b/ios/shared/chrome/browser/ui/toolbar/toolbar_test_util.mm
new file mode 100644
index 0000000000000000000000000000000000000000..5de45cda31ccd85bd2c9a4bf0a865442357ca338
--- /dev/null
+++ b/ios/shared/chrome/browser/ui/toolbar/toolbar_test_util.mm
@@ -0,0 +1,38 @@
+// 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/shared/chrome/browser/ui/toolbar/toolbar_test_util.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+ToolbarTestWebState::ToolbarTestWebState() : loading_progress_(0){};
+
+double ToolbarTestWebState::GetLoadingProgress() const {
+ return loading_progress_;
+}
+
+void ToolbarTestWebState::set_loading_progress(double loading_progress) {
+ loading_progress_ = loading_progress;
+}
+
+ToolbarTestNavigationManager::ToolbarTestNavigationManager()
+ : can_go_back_(false), can_go_forward_(false) {}
+
+bool ToolbarTestNavigationManager::CanGoBack() const {
+ return can_go_back_;
+}
+
+bool ToolbarTestNavigationManager::CanGoForward() const {
+ return can_go_forward_;
+}
+
+void ToolbarTestNavigationManager::set_can_go_back(bool can_go_back) {
+ can_go_back_ = can_go_back;
+}
+
+void ToolbarTestNavigationManager::set_can_go_forward(bool can_go_forward) {
+ can_go_forward_ = can_go_forward;
+}
« no previous file with comments | « ios/shared/chrome/browser/ui/toolbar/toolbar_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698