| Index: chrome/browser/extensions/component_migration_helper_unittest.cc
|
| diff --git a/chrome/browser/extensions/component_migration_helper_unittest.cc b/chrome/browser/extensions/component_migration_helper_unittest.cc
|
| index 1a869cd5816a5b13864b5077d8a539bcbbfcba7b..8168c7748b19fcf49eabf07957459a3ce742e6cf 100644
|
| --- a/chrome/browser/extensions/component_migration_helper_unittest.cc
|
| +++ b/chrome/browser/extensions/component_migration_helper_unittest.cc
|
| @@ -12,7 +12,6 @@
|
| #include "chrome/browser/extensions/extension_service.h"
|
| #include "chrome/browser/extensions/extension_service_test_base.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| -#include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "components/prefs/pref_registry_simple.h"
|
| #include "extensions/browser/extension_registry.h"
|
| @@ -46,11 +45,6 @@
|
|
|
| void SetTestComponentActionPref(bool enabled) {
|
| SetComponentActionPref(kTestActionId, enabled);
|
| - }
|
| -
|
| - void SetMediaRouterActionPref(bool enabled) {
|
| - SetComponentActionPref(
|
| - ComponentToolbarActionsFactory::kMediaRouterActionId, enabled);
|
| }
|
|
|
| void EnableTestFeature() { enabled_actions_.insert(kTestActionId); }
|
| @@ -101,11 +95,6 @@
|
| return enable_value;
|
| }
|
|
|
| - bool IsMediaRouterActionAlwaysShown() {
|
| - return profile()->GetPrefs()->
|
| - GetBoolean(prefs::kMediaRouterAlwaysShowActionIcon);
|
| - }
|
| -
|
| StrictMock<MockComponentActionDelegate> mock_delegate_;
|
| std::unique_ptr<StrictMock<MockComponentMigrationHelper>> mock_helper_;
|
| std::unique_ptr<FeatureSwitch::ScopedOverride> extension_action_redesign_;
|
| @@ -220,32 +209,4 @@
|
| EXPECT_FALSE(IsTestComponentActionEnabled());
|
| }
|
|
|
| -TEST_F(ComponentMigrationHelperTest, EnableAndDisableMediaRouterAction) {
|
| - mock_helper_->SetMediaRouterActionPref(true);
|
| - mock_helper_->Register(
|
| - ComponentToolbarActionsFactory::kMediaRouterActionId,
|
| - "test_cast_extension");
|
| - EXPECT_FALSE(IsMediaRouterActionAlwaysShown());
|
| -
|
| - EXPECT_CALL(mock_delegate_, HasComponentAction(
|
| - ComponentToolbarActionsFactory::kMediaRouterActionId))
|
| - .WillOnce(Return(false));
|
| - EXPECT_CALL(mock_delegate_, AddComponentAction(
|
| - ComponentToolbarActionsFactory::kMediaRouterActionId));
|
| -
|
| - mock_helper_->OnFeatureEnabled(
|
| - ComponentToolbarActionsFactory::kMediaRouterActionId);
|
| - EXPECT_TRUE(IsMediaRouterActionAlwaysShown());
|
| -
|
| - EXPECT_CALL(mock_delegate_, HasComponentAction(
|
| - ComponentToolbarActionsFactory::kMediaRouterActionId))
|
| - .WillOnce(Return(true));
|
| - EXPECT_CALL(mock_delegate_, RemoveComponentAction(
|
| - ComponentToolbarActionsFactory::kMediaRouterActionId));
|
| -
|
| - mock_helper_->OnFeatureDisabled(
|
| - ComponentToolbarActionsFactory::kMediaRouterActionId);
|
| - EXPECT_FALSE(IsMediaRouterActionAlwaysShown());
|
| -}
|
| -
|
| } // namespace extensions
|
|
|