OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_UNITTEST_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_UNITTEST_H_ |
6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_UNITTEST_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_UNITTEST_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/browser/extensions/browser_action_test_util.h" | 10 #include "chrome/browser/extensions/browser_action_test_util.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 const char* expected_names[], | 68 const char* expected_names[], |
69 size_t total_size, | 69 size_t total_size, |
70 size_t visible_count) WARN_UNUSED_RESULT; | 70 size_t visible_count) WARN_UNUSED_RESULT; |
71 | 71 |
72 ToolbarActionsBar* toolbar_actions_bar() { | 72 ToolbarActionsBar* toolbar_actions_bar() { |
73 return browser_action_test_util_->GetToolbarActionsBar(); | 73 return browser_action_test_util_->GetToolbarActionsBar(); |
74 } | 74 } |
75 ToolbarActionsBar* overflow_bar() { | 75 ToolbarActionsBar* overflow_bar() { |
76 return overflow_browser_action_test_util_->GetToolbarActionsBar(); | 76 return overflow_browser_action_test_util_->GetToolbarActionsBar(); |
77 } | 77 } |
78 extensions::ExtensionToolbarModel* toolbar_model() { | 78 ToolbarActionsModel* toolbar_model() { return toolbar_model_; } |
79 return toolbar_model_; | |
80 } | |
81 BrowserActionTestUtil* browser_action_test_util() { | 79 BrowserActionTestUtil* browser_action_test_util() { |
82 return browser_action_test_util_.get(); | 80 return browser_action_test_util_.get(); |
83 } | 81 } |
84 BrowserActionTestUtil* overflow_browser_action_test_util() { | 82 BrowserActionTestUtil* overflow_browser_action_test_util() { |
85 return overflow_browser_action_test_util_.get(); | 83 return overflow_browser_action_test_util_.get(); |
86 } | 84 } |
87 | 85 |
88 private: | 86 private: |
89 // The associated ExtensionToolbarModel (owned by the keyed service setup). | 87 // The associated ToolbarActionsModel (owned by the keyed service setup). |
90 extensions::ExtensionToolbarModel* toolbar_model_; | 88 ToolbarActionsModel* toolbar_model_; |
91 | 89 |
92 // A BrowserActionTestUtil object constructed with the associated | 90 // A BrowserActionTestUtil object constructed with the associated |
93 // ToolbarActionsBar. | 91 // ToolbarActionsBar. |
94 scoped_ptr<BrowserActionTestUtil> browser_action_test_util_; | 92 scoped_ptr<BrowserActionTestUtil> browser_action_test_util_; |
95 | 93 |
96 // The overflow container's BrowserActionTestUtil (only non-null if | 94 // The overflow container's BrowserActionTestUtil (only non-null if |
97 // |use_redesign| is true). | 95 // |use_redesign| is true). |
98 scoped_ptr<BrowserActionTestUtil> overflow_browser_action_test_util_; | 96 scoped_ptr<BrowserActionTestUtil> overflow_browser_action_test_util_; |
99 | 97 |
100 // True if the extension action redesign switch should be enabled. | 98 // True if the extension action redesign switch should be enabled. |
101 bool use_redesign_; | 99 bool use_redesign_; |
102 | 100 |
103 scoped_ptr<extensions::FeatureSwitch::ScopedOverride> redesign_switch_; | 101 scoped_ptr<extensions::FeatureSwitch::ScopedOverride> redesign_switch_; |
104 | 102 |
105 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBarUnitTest); | 103 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBarUnitTest); |
106 }; | 104 }; |
107 | 105 |
108 class ToolbarActionsBarRedesignUnitTest : public ToolbarActionsBarUnitTest { | 106 class ToolbarActionsBarRedesignUnitTest : public ToolbarActionsBarUnitTest { |
109 public: | 107 public: |
110 ToolbarActionsBarRedesignUnitTest(); | 108 ToolbarActionsBarRedesignUnitTest(); |
111 ~ToolbarActionsBarRedesignUnitTest() override; | 109 ~ToolbarActionsBarRedesignUnitTest() override; |
112 | 110 |
113 private: | 111 private: |
114 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBarRedesignUnitTest); | 112 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBarRedesignUnitTest); |
115 }; | 113 }; |
116 | 114 |
117 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_UNITTEST_H_ | 115 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_UNITTEST_H_ |
OLD | NEW |