1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_TEST_HELPER_H_
6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_TEST_HELPER_H_
7 
8 #include "base/macros.h"
9 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
10 
11 // Used to access private state of BookmarkBarView for testing.
12 class BookmarkBarViewTestHelper {
13  public:
BookmarkBarViewTestHelper(BookmarkBarView * bbv)14   explicit BookmarkBarViewTestHelper(BookmarkBarView* bbv) : bbv_(bbv) {}
~BookmarkBarViewTestHelper()15   ~BookmarkBarViewTestHelper() {}
16 
GetBookmarkButtonCount()17   size_t GetBookmarkButtonCount() { return bbv_->bookmark_buttons_.size(); }
18 
GetBookmarkButton(size_t index)19   views::LabelButton* GetBookmarkButton(size_t index) {
20     return bbv_->bookmark_buttons_[index];
21   }
22 
apps_page_shortcut()23   views::LabelButton* apps_page_shortcut() { return bbv_->apps_page_shortcut_; }
24 
overflow_button()25   views::MenuButton* overflow_button() { return bbv_->overflow_button_; }
26 
managed_bookmarks_button()27   views::MenuButton* managed_bookmarks_button() {
28     return bbv_->managed_bookmarks_button_;
29   }
30 
31  private:
32   BookmarkBarView* bbv_;
33 
34   DISALLOW_COPY_AND_ASSIGN(BookmarkBarViewTestHelper);
35 };
36 
37 #endif  // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_TEST_HELPER_H_
38