Commit 690f0fae authored by Bret Sepulveda's avatar Bret Sepulveda Committed by Commit Bot

Fix MediaRouterContextualMenuUnitTest when ExtensionsToolbarMenu is on.

MediaRouterContextualMenuUnitTest was creating a BrowserActionTestUtil,
which when the feature is on relies on BrowserView::toolbar, which is
not defined in a non-Views test. However, it appears
BrowserActionTestUtil is not actually necessary for the tests, so this
patch deletes it.

Bug: 984654
Change-Id: I5c40a54ea2383dc7a1c47c0f244370f005692e3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1916464Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715632}
parent 38312a3e
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include "chrome/browser/media/router/media_router_factory.h" #include "chrome/browser/media/router/media_router_factory.h"
#include "chrome/browser/media/router/test/mock_media_router.h" #include "chrome/browser/media/router/test/mock_media_router.h"
#include "chrome/browser/signin/identity_test_environment_profile_adaptor.h" #include "chrome/browser/signin/identity_test_environment_profile_adaptor.h"
#include "chrome/browser/ui/extensions/browser_action_test_util.h"
#include "chrome/browser/ui/media_router/media_router_ui_service.h" #include "chrome/browser/ui/media_router/media_router_ui_service.h"
#include "chrome/browser/ui/media_router/media_router_ui_service_factory.h" #include "chrome/browser/ui/media_router/media_router_ui_service_factory.h"
#include "chrome/browser/ui/toolbar/media_router_action_controller.h" #include "chrome/browser/ui/toolbar/media_router_action_controller.h"
...@@ -70,8 +69,6 @@ class MediaRouterContextualMenuUnitTest : public BrowserWithTestWindowTest { ...@@ -70,8 +69,6 @@ class MediaRouterContextualMenuUnitTest : public BrowserWithTestWindowTest {
identity_test_env_adaptor_ = identity_test_env_adaptor_ =
std::make_unique<IdentityTestEnvironmentProfileAdaptor>(profile()); std::make_unique<IdentityTestEnvironmentProfileAdaptor>(profile());
browser_action_test_util_ = BrowserActionTestUtil::Create(browser(), false);
// Pin the Cast icon to the toolbar. // Pin the Cast icon to the toolbar.
MediaRouterActionController::SetAlwaysShowActionPref(profile(), true); MediaRouterActionController::SetAlwaysShowActionPref(profile(), true);
...@@ -84,7 +81,6 @@ class MediaRouterContextualMenuUnitTest : public BrowserWithTestWindowTest { ...@@ -84,7 +81,6 @@ class MediaRouterContextualMenuUnitTest : public BrowserWithTestWindowTest {
// |identity_test_env_adaptor_| must be destroyed before the TestingProfile, // |identity_test_env_adaptor_| must be destroyed before the TestingProfile,
// which occurs in BrowserWithTestWindowTest::TearDown(). // which occurs in BrowserWithTestWindowTest::TearDown().
identity_test_env_adaptor_.reset(); identity_test_env_adaptor_.reset();
browser_action_test_util_.reset();
BrowserWithTestWindowTest::TearDown(); BrowserWithTestWindowTest::TearDown();
} }
...@@ -107,7 +103,6 @@ class MediaRouterContextualMenuUnitTest : public BrowserWithTestWindowTest { ...@@ -107,7 +103,6 @@ class MediaRouterContextualMenuUnitTest : public BrowserWithTestWindowTest {
return identity_test_env_adaptor_->identity_test_env(); return identity_test_env_adaptor_->identity_test_env();
} }
std::unique_ptr<BrowserActionTestUtil> browser_action_test_util_;
std::unique_ptr<IdentityTestEnvironmentProfileAdaptor> std::unique_ptr<IdentityTestEnvironmentProfileAdaptor>
identity_test_env_adaptor_; identity_test_env_adaptor_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment