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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #import "ios/shared/chrome/browser/ui/toolbar/toolbar_test_util.h"
6
7 #if !defined(__has_feature) || !__has_feature(objc_arc)
8 #error "This file requires ARC support."
9 #endif
10
11 ToolbarTestWebState::ToolbarTestWebState() : loading_progress_(0){};
12
13 double ToolbarTestWebState::GetLoadingProgress() const {
14 return loading_progress_;
15 }
16
17 void ToolbarTestWebState::set_loading_progress(double loading_progress) {
18 loading_progress_ = loading_progress;
19 }
20
21 ToolbarTestNavigationManager::ToolbarTestNavigationManager()
22 : can_go_back_(false), can_go_forward_(false) {}
23
24 bool ToolbarTestNavigationManager::CanGoBack() const {
25 return can_go_back_;
26 }
27
28 bool ToolbarTestNavigationManager::CanGoForward() const {
29 return can_go_forward_;
30 }
31
32 void ToolbarTestNavigationManager::set_can_go_back(bool can_go_back) {
33 can_go_back_ = can_go_back;
34 }
35
36 void ToolbarTestNavigationManager::set_can_go_forward(bool can_go_forward) {
37 can_go_forward_ = can_go_forward;
38 }
OLDNEW
« 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