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

Side by Side Diff: chrome/browser/extensions/extension_context_menu_model_unittest.cc

Issue 2307803002: [Media Router] Enable MR by default now that it is at 100% in stable. (Closed)
Patch Set: Add MR FeatureSwitch to failing test cases Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/toolbar/toolbar_actions_model_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/extensions/extension_context_menu_model.h" 5 #include "chrome/browser/extensions/extension_context_menu_model.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 335
336 // We shouldn't go above the limit of top-level items. 336 // We shouldn't go above the limit of top-level items.
337 EXPECT_EQ(api::context_menus::ACTION_MENU_TOP_LEVEL_LIMIT, 337 EXPECT_EQ(api::context_menus::ACTION_MENU_TOP_LEVEL_LIMIT,
338 CountExtensionItems(*builder.BuildMenu())); 338 CountExtensionItems(*builder.BuildMenu()));
339 } 339 }
340 340
341 // Test that the "show" and "hide" menu items appear correctly in the extension 341 // Test that the "show" and "hide" menu items appear correctly in the extension
342 // context menu without the toolbar redesign. 342 // context menu without the toolbar redesign.
343 TEST_F(ExtensionContextMenuModelTest, ExtensionContextMenuShowAndHideLegacy) { 343 TEST_F(ExtensionContextMenuModelTest, ExtensionContextMenuShowAndHideLegacy) {
344 // Start with the toolbar redesign disabled. 344 // Start with the toolbar redesign disabled.
345 std::unique_ptr<FeatureSwitch::ScopedOverride> toolbar_redesign_override( 345 // Disable Media Router first, since Extension Action Redesign would be force
Devlin 2016/09/08 22:03:13 It might be out of scope for this change, but can
imcheng 2016/09/09 16:51:24 Sure, it should be a pretty small and harmless cha
346 new FeatureSwitch::ScopedOverride( 346 // enabled otherwise.
347 FeatureSwitch::extension_action_redesign(), false)); 347 FeatureSwitch::ScopedOverride enable_media_router(
348 extensions::FeatureSwitch::media_router(), false);
349 FeatureSwitch::ScopedOverride toolbar_redesign_override(
350 FeatureSwitch::extension_action_redesign(), false);
348 351
349 InitializeEmptyExtensionService(); 352 InitializeEmptyExtensionService();
350 Browser* browser = GetBrowser(); 353 Browser* browser = GetBrowser();
351 extension_action_test_util::CreateToolbarModelForProfile(profile()); 354 extension_action_test_util::CreateToolbarModelForProfile(profile());
352 355
353 const Extension* page_action = AddExtension( 356 const Extension* page_action = AddExtension(
354 "page_action_extension", manifest_keys::kPageAction, Manifest::INTERNAL); 357 "page_action_extension", manifest_keys::kPageAction, Manifest::INTERNAL);
355 const Extension* browser_action = 358 const Extension* browser_action =
356 AddExtension("browser_action_extension", manifest_keys::kBrowserAction, 359 AddExtension("browser_action_extension", manifest_keys::kBrowserAction,
357 Manifest::INTERNAL); 360 Manifest::INTERNAL);
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 "no_action", nullptr, Manifest::INTERNAL); 710 "no_action", nullptr, Manifest::INTERNAL);
708 ExtensionContextMenuModel menu(no_action, GetBrowser(), 711 ExtensionContextMenuModel menu(no_action, GetBrowser(),
709 ExtensionContextMenuModel::VISIBLE, nullptr); 712 ExtensionContextMenuModel::VISIBLE, nullptr);
710 int inspect_popup_index = 713 int inspect_popup_index =
711 menu.GetIndexOfCommandId(ExtensionContextMenuModel::INSPECT_POPUP); 714 menu.GetIndexOfCommandId(ExtensionContextMenuModel::INSPECT_POPUP);
712 EXPECT_EQ(-1, inspect_popup_index); 715 EXPECT_EQ(-1, inspect_popup_index);
713 } 716 }
714 } 717 }
715 718
716 } // namespace extensions 719 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/toolbar/toolbar_actions_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698