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

Unified Diff: ui/app_list/views/folder_header_view.h

Issue 217473005: Test cases for FolderHeaderView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « ui/app_list/test/app_list_test_model.cc ('k') | ui/app_list/views/folder_header_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/folder_header_view.h
diff --git a/ui/app_list/views/folder_header_view.h b/ui/app_list/views/folder_header_view.h
index 6b1ca12f361aa0f74403ac329168263173b26e58..109c39a31fa8b0fd033d3274acc51c5cfa0a1c0b 100644
--- a/ui/app_list/views/folder_header_view.h
+++ b/ui/app_list/views/folder_header_view.h
@@ -7,6 +7,7 @@
#include <string>
+#include "ui/app_list/app_list_export.h"
#include "ui/app_list/app_list_item_observer.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/textfield/textfield_controller.h"
@@ -22,11 +23,15 @@ class AppListFolderItem;
class AppListFolderView;
class FolderHeaderViewDelegate;
+namespace test {
+class FolderHeaderViewTest;
+}
+
// FolderHeaderView contains a back button and an editable folder name field.
-class FolderHeaderView : public views::View,
- public views::TextfieldController,
- public views::ButtonListener,
- public AppListItemObserver {
+class APP_LIST_EXPORT FolderHeaderView : public views::View,
+ public views::TextfieldController,
+ public views::ButtonListener,
+ public AppListItemObserver {
public:
explicit FolderHeaderView(FolderHeaderViewDelegate* delegate);
virtual ~FolderHeaderView();
@@ -40,10 +45,18 @@ class FolderHeaderView : public views::View,
private:
class FolderNameView;
+ friend class test::FolderHeaderViewTest;
// Updates UI.
void Update();
+ // Gets and sets the folder name for test.
+ const base::string16& GetFolderNameForTest();
+ void SetFolderNameForTest(const base::string16& name);
+
+ // Returns true if folder name is enabled, only for testing use.
+ bool IsFolderNameEnabledForTest() const;
+
// views::View overrides:
virtual void Layout() OVERRIDE;
virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
« no previous file with comments | « ui/app_list/test/app_list_test_model.cc ('k') | ui/app_list/views/folder_header_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698