Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(985)

Unified Diff: chrome/browser/extensions/component_migration_helper_unittest.cc

Issue 1612203002: [Media Router] Adds a contextual menu item to remove the MR component action. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to pkasting@ comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 02489928eddbc36fda053c2793679161a98c95d5..4b0ebb85a52a56be9f8a8a19c662ec90d38c3ca0 100644
--- a/chrome/browser/extensions/component_migration_helper_unittest.cc
+++ b/chrome/browser/extensions/component_migration_helper_unittest.cc
@@ -191,4 +191,22 @@ TEST_F(ComponentMigrationHelperTest, InstallUnregisteredExtension) {
registry()->enabled_extensions().Contains(unregistered_extension_->id()));
}
+TEST_F(ComponentMigrationHelperTest, RemoveComponentAction) {
+ mock_helper_->SetTestComponentActionPref(true);
+
+ EXPECT_CALL(mock_delegate_, HasComponentAction(kTestActionId))
+ .WillOnce(Return(false));
+ EXPECT_CALL(mock_delegate_, AddComponentAction(kTestActionId));
+
+ mock_helper_->OnFeatureEnabled(kTestActionId);
+ EXPECT_TRUE(IsTestComponentActionEnabled());
+
+ EXPECT_CALL(mock_delegate_, HasComponentAction(kTestActionId))
+ .WillOnce(Return(true));
+ EXPECT_CALL(mock_delegate_, RemoveComponentAction(kTestActionId));
+
+ mock_helper_->OnActionRemoved(kTestActionId);
+ EXPECT_FALSE(IsTestComponentActionEnabled());
+}
+
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/component_migration_helper.cc ('k') | chrome/browser/ui/toolbar/media_router_contextual_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698