| 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() { |
| 79 return toolbar_model_; | 79 return toolbar_model_; |
| 80 } | 80 } |
| 81 BrowserActionTestUtil* browser_action_test_util() { | 81 BrowserActionTestUtil* browser_action_test_util() { |
| 82 return browser_action_test_util_.get(); | 82 return browser_action_test_util_.get(); |
| 83 } | 83 } |
| 84 BrowserActionTestUtil* overflow_browser_action_test_util() { | 84 BrowserActionTestUtil* overflow_browser_action_test_util() { |
| 85 return overflow_browser_action_test_util_.get(); | 85 return overflow_browser_action_test_util_.get(); |
| 86 } | 86 } |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 // The associated ExtensionToolbarModel (owned by the keyed service setup). | 89 // The associated ToolbarActionsModel (owned by the keyed service setup). |
| 90 extensions::ExtensionToolbarModel* toolbar_model_; | 90 ToolbarActionsModel* toolbar_model_; |
| 91 | 91 |
| 92 // A BrowserActionTestUtil object constructed with the associated | 92 // A BrowserActionTestUtil object constructed with the associated |
| 93 // ToolbarActionsBar. | 93 // ToolbarActionsBar. |
| 94 scoped_ptr<BrowserActionTestUtil> browser_action_test_util_; | 94 scoped_ptr<BrowserActionTestUtil> browser_action_test_util_; |
| 95 | 95 |
| 96 // The overflow container's BrowserActionTestUtil (only non-null if | 96 // The overflow container's BrowserActionTestUtil (only non-null if |
| 97 // |use_redesign| is true). | 97 // |use_redesign| is true). |
| 98 scoped_ptr<BrowserActionTestUtil> overflow_browser_action_test_util_; | 98 scoped_ptr<BrowserActionTestUtil> overflow_browser_action_test_util_; |
| 99 | 99 |
| 100 // True if the extension action redesign switch should be enabled. | 100 // True if the extension action redesign switch should be enabled. |
| 101 bool use_redesign_; | 101 bool use_redesign_; |
| 102 | 102 |
| 103 scoped_ptr<extensions::FeatureSwitch::ScopedOverride> redesign_switch_; | 103 scoped_ptr<extensions::FeatureSwitch::ScopedOverride> redesign_switch_; |
| 104 | 104 |
| 105 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBarUnitTest); | 105 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBarUnitTest); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 class ToolbarActionsBarRedesignUnitTest : public ToolbarActionsBarUnitTest { | 108 class ToolbarActionsBarRedesignUnitTest : public ToolbarActionsBarUnitTest { |
| 109 public: | 109 public: |
| 110 ToolbarActionsBarRedesignUnitTest(); | 110 ToolbarActionsBarRedesignUnitTest(); |
| 111 ~ToolbarActionsBarRedesignUnitTest() override; | 111 ~ToolbarActionsBarRedesignUnitTest() override; |
| 112 | 112 |
| 113 private: | 113 private: |
| 114 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBarRedesignUnitTest); | 114 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBarRedesignUnitTest); |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_UNITTEST_H_ | 117 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_UNITTEST_H_ |
| OLD | NEW |