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