| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_BROWSER_ACTIONS_BAR_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_BROWSER_ACTIONS_BAR_BROWSERTEST_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_BROWSER_ACTIONS_BAR_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_BROWSER_ACTIONS_BAR_BROWSERTEST_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "chrome/browser/extensions/extension_browsertest.h" | 12 #include "chrome/browser/extensions/extension_browsertest.h" |
| 12 #include "extensions/common/feature_switch.h" | 13 #include "extensions/common/feature_switch.h" |
| 13 | 14 |
| 14 namespace extensions { | 15 namespace extensions { |
| 15 class Extension; | 16 class Extension; |
| 16 } | 17 } |
| 17 | 18 |
| 18 class BrowserActionTestUtil; | 19 class BrowserActionTestUtil; |
| 19 class ToolbarActionsModel; | 20 class ToolbarActionsModel; |
| 20 | 21 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 43 } | 44 } |
| 44 const extensions::Extension* extension_b() const { | 45 const extensions::Extension* extension_b() const { |
| 45 return extension_b_.get(); | 46 return extension_b_.get(); |
| 46 } | 47 } |
| 47 const extensions::Extension* extension_c() const { | 48 const extensions::Extension* extension_c() const { |
| 48 return extension_c_.get(); | 49 return extension_c_.get(); |
| 49 } | 50 } |
| 50 | 51 |
| 51 protected: | 52 protected: |
| 52 // Enable or disable the feature redesign switch. | 53 // Enable or disable the feature redesign switch. |
| 53 scoped_ptr<extensions::FeatureSwitch::ScopedOverride> override_redesign_; | 54 std::unique_ptr<extensions::FeatureSwitch::ScopedOverride> override_redesign_; |
| 54 | 55 |
| 55 private: | 56 private: |
| 56 scoped_ptr<BrowserActionTestUtil> browser_actions_bar_; | 57 std::unique_ptr<BrowserActionTestUtil> browser_actions_bar_; |
| 57 | 58 |
| 58 // The associated toolbar model, weak. | 59 // The associated toolbar model, weak. |
| 59 ToolbarActionsModel* toolbar_model_; | 60 ToolbarActionsModel* toolbar_model_; |
| 60 | 61 |
| 61 // Extensions with browser actions used for testing. | 62 // Extensions with browser actions used for testing. |
| 62 scoped_refptr<const extensions::Extension> extension_a_; | 63 scoped_refptr<const extensions::Extension> extension_a_; |
| 63 scoped_refptr<const extensions::Extension> extension_b_; | 64 scoped_refptr<const extensions::Extension> extension_b_; |
| 64 scoped_refptr<const extensions::Extension> extension_c_; | 65 scoped_refptr<const extensions::Extension> extension_c_; |
| 65 | 66 |
| 66 DISALLOW_COPY_AND_ASSIGN(BrowserActionsBarBrowserTest); | 67 DISALLOW_COPY_AND_ASSIGN(BrowserActionsBarBrowserTest); |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 // A test with the extension-action-redesign switch enabled. | 70 // A test with the extension-action-redesign switch enabled. |
| 70 class BrowserActionsBarRedesignBrowserTest | 71 class BrowserActionsBarRedesignBrowserTest |
| 71 : public BrowserActionsBarBrowserTest { | 72 : public BrowserActionsBarBrowserTest { |
| 72 protected: | 73 protected: |
| 73 BrowserActionsBarRedesignBrowserTest(); | 74 BrowserActionsBarRedesignBrowserTest(); |
| 74 ~BrowserActionsBarRedesignBrowserTest() override; | 75 ~BrowserActionsBarRedesignBrowserTest() override; |
| 75 | 76 |
| 76 void SetUpCommandLine(base::CommandLine* command_line) override; | 77 void SetUpCommandLine(base::CommandLine* command_line) override; |
| 77 | 78 |
| 78 private: | 79 private: |
| 79 DISALLOW_COPY_AND_ASSIGN(BrowserActionsBarRedesignBrowserTest); | 80 DISALLOW_COPY_AND_ASSIGN(BrowserActionsBarRedesignBrowserTest); |
| 80 }; | 81 }; |
| 81 | 82 |
| 82 #endif // CHROME_BROWSER_UI_TOOLBAR_BROWSER_ACTIONS_BAR_BROWSERTEST_H_ | 83 #endif // CHROME_BROWSER_UI_TOOLBAR_BROWSER_ACTIONS_BAR_BROWSERTEST_H_ |
| OLD | NEW |