summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test_helper.h
blob: d349c5ff7b9849ef6463632f278439fa00a78f53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2014 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 CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_TEST_HELPER_H_
#define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_TEST_HELPER_H_

#include "base/macros.h"
#include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"

// Used to access private state of BookmarkBarView for testing.
class BookmarkBarViewTestHelper {
 public:
  explicit BookmarkBarViewTestHelper(BookmarkBarView* bbv) : bbv_(bbv) {}
  ~BookmarkBarViewTestHelper() {}

  int GetBookmarkButtonCount() { return bbv_->GetBookmarkButtonCount(); }

  views::LabelButton* GetBookmarkButton(int index) {
    return bbv_->GetBookmarkButton(index);
  }

  views::LabelButton* apps_page_shortcut() { return bbv_->apps_page_shortcut_; }

  views::MenuButton* overflow_button() { return bbv_->overflow_button_; }

 private:
  BookmarkBarView* bbv_;

  DISALLOW_COPY_AND_ASSIGN(BookmarkBarViewTestHelper);
};

#endif  // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_TEST_HELPER_H_