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

Side by Side Diff: chrome/browser/extensions/api/declarative_content/declarative_content_apitest.cc

Issue 2451573003: [Media Router] Update Media Router flags post-launch. (Closed)
Patch Set: Rebase & respond to apacible@ comments. Created 4 years, 1 month 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
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 ExtensionActionManager::Get(browser()->profile()) 742 ExtensionActionManager::Get(browser()->profile())
743 ->GetPageAction(*extension); 743 ->GetPageAction(*extension);
744 EXPECT_EQ(expect_page_action, page_action != nullptr); 744 EXPECT_EQ(expect_page_action, page_action != nullptr);
745 EXPECT_EQ(expect_page_action ? 1u : 0u, 745 EXPECT_EQ(expect_page_action ? 1u : 0u,
746 extension_action_test_util::GetVisiblePageActionCount(tab)); 746 extension_action_test_util::GetVisiblePageActionCount(tab));
747 } 747 }
748 748
749 private: 749 private:
750 void SetUpCommandLine(base::CommandLine* command_line) override { 750 void SetUpCommandLine(base::CommandLine* command_line) override {
751 DeclarativeContentApiTest::SetUpCommandLine(command_line); 751 DeclarativeContentApiTest::SetUpCommandLine(command_line);
752 // If disabling the redesign, we need to disable Media Router since having
753 // Media Router enabled will result in auto-enabling the redesign and
754 // breaking the test.
755 if (!enable_redesign_) {
756 override_media_router_.reset(new FeatureSwitch::ScopedOverride(
757 FeatureSwitch::media_router(), false));
758 }
759 override_toolbar_redesign_.reset(new FeatureSwitch::ScopedOverride( 752 override_toolbar_redesign_.reset(new FeatureSwitch::ScopedOverride(
760 FeatureSwitch::extension_action_redesign(), enable_redesign_)); 753 FeatureSwitch::extension_action_redesign(), enable_redesign_));
761 } 754 }
762 755
763 bool enable_redesign_; 756 bool enable_redesign_;
764 std::unique_ptr<FeatureSwitch::ScopedOverride> override_toolbar_redesign_; 757 std::unique_ptr<FeatureSwitch::ScopedOverride> override_toolbar_redesign_;
765 std::unique_ptr<FeatureSwitch::ScopedOverride> override_media_router_;
766 DISALLOW_COPY_AND_ASSIGN(ShowPageActionWithoutPageActionTest); 758 DISALLOW_COPY_AND_ASSIGN(ShowPageActionWithoutPageActionTest);
767 }; 759 };
768 760
769 class ShowPageActionWithoutPageActionLegacyTest 761 class ShowPageActionWithoutPageActionLegacyTest
770 : public ShowPageActionWithoutPageActionTest { 762 : public ShowPageActionWithoutPageActionTest {
771 protected: 763 protected:
772 ShowPageActionWithoutPageActionLegacyTest() 764 ShowPageActionWithoutPageActionLegacyTest()
773 : ShowPageActionWithoutPageActionTest(false) {} 765 : ShowPageActionWithoutPageActionTest(false) {}
774 }; 766 };
775 767
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 // action interfaces, add a test that checks that a navigation always evaluates 975 // action interfaces, add a test that checks that a navigation always evaluates
984 // consistent URL state for all conditions. i.e.: if condition1 evaluates to 976 // consistent URL state for all conditions. i.e.: if condition1 evaluates to
985 // false on url0 and true on url1, and condition2 evaluates to true on url0 and 977 // false on url0 and true on url1, and condition2 evaluates to true on url0 and
986 // false on url1, navigate from url0 to url1 and validate that no action is 978 // false on url1, navigate from url0 to url1 and validate that no action is
987 // triggered. Do the same when navigating back to url0. This kind of test is 979 // triggered. Do the same when navigating back to url0. This kind of test is
988 // unfortunately not feasible with the current implementation and the existing 980 // unfortunately not feasible with the current implementation and the existing
989 // supported conditions and actions. 981 // supported conditions and actions.
990 982
991 } // namespace 983 } // namespace
992 } // namespace extensions 984 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/extensions/extension_context_menu_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698