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

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

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
Index: ios/shared/chrome/browser/ui/toolbar/toolbar_test_util.h
diff --git a/ios/shared/chrome/browser/ui/toolbar/toolbar_test_util.h b/ios/shared/chrome/browser/ui/toolbar/toolbar_test_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..41774a012ca842ceeb4295e1bb0d5e0d87e99265
--- /dev/null
+++ b/ios/shared/chrome/browser/ui/toolbar/toolbar_test_util.h
@@ -0,0 +1,39 @@
+// 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.
+
+#ifndef IOS_SHARED_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_TEST_UTIL_H_
+#define IOS_SHARED_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_TEST_UTIL_H_
+
+#import "ios/web/public/test/fakes/test_navigation_manager.h"
+#import "ios/web/public/test/fakes/test_web_state.h"
+
+class ToolbarTestWebState : public web::TestWebState {
+ public:
+ ToolbarTestWebState();
+
+ double GetLoadingProgress() const override;
+ void set_loading_progress(double loading_progress);
+
+ private:
+ double loading_progress_;
+
+ DISALLOW_COPY_AND_ASSIGN(ToolbarTestWebState);
+};
+
+class ToolbarTestNavigationManager : public web::TestNavigationManager {
+ public:
+ ToolbarTestNavigationManager();
+
+ bool CanGoBack() const override;
+ bool CanGoForward() const override;
+
+ void set_can_go_back(bool can_go_back);
+ void set_can_go_forward(bool can_go_forward);
+
+ private:
+ bool can_go_back_;
+ bool can_go_forward_;
+};
+
+#endif // IOS_SHARED_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_TEST_UTIL_H_
« no previous file with comments | « ios/shared/chrome/browser/ui/toolbar/BUILD.gn ('k') | ios/shared/chrome/browser/ui/toolbar/toolbar_test_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698