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_ |