| Index: chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_ash_unittest.cc
|
| diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_ash_unittest.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_ash_unittest.cc
|
| index 22fec4271a0c50e50930d120387630fc1adafe82..abf2dbb18e202d6ba5779058c062e5bd67ea5b66 100644
|
| --- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_ash_unittest.cc
|
| +++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_ash_unittest.cc
|
| @@ -12,6 +12,11 @@
|
| #include "ui/views/widget/widget.h"
|
| #include "ui/views/window/dialog_delegate.h"
|
|
|
| +#if defined(OS_CHROMEOS)
|
| +#include "chrome/browser/chromeos/arc/arc_auth_service.h"
|
| +#include "components/arc/test/fake_arc_bridge_service.h"
|
| +#endif
|
| +
|
| namespace {
|
|
|
| const char kTestExtensionId[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
| @@ -26,6 +31,14 @@ class AppInfoDialogAshTest : public ash::test::AshTestBase {
|
| // Overridden from testing::Test:
|
| void SetUp() override {
|
| ash::test::AshTestBase::SetUp();
|
| +#if defined(OS_CHROMEOS)
|
| + arc::ArcAuthService::DisableUIForTesting();
|
| + bridge_service_ = base::MakeUnique<arc::FakeArcBridgeService>();
|
| + auth_service_ =
|
| + base::MakeUnique<arc::ArcAuthService>(bridge_service_.get());
|
| + auth_service_->OnPrimaryUserProfilePrepared(
|
| + extension_environment_.profile());
|
| +#endif
|
| widget_ = views::DialogDelegate::CreateDialogWidget(
|
| new views::DialogDelegateView(), CurrentContext(), NULL);
|
| dialog_ = new AppInfoDialog(
|
| @@ -36,6 +49,10 @@ class AppInfoDialogAshTest : public ash::test::AshTestBase {
|
|
|
| void TearDown() override {
|
| widget_->CloseNow();
|
| +#if defined(OS_CHROMEOS)
|
| + if (auth_service_)
|
| + auth_service_->Shutdown();
|
| +#endif
|
| ash::test::AshTestBase::TearDown();
|
| }
|
|
|
| @@ -43,7 +60,12 @@ class AppInfoDialogAshTest : public ash::test::AshTestBase {
|
| extensions::TestExtensionEnvironment extension_environment_;
|
| views::Widget* widget_ = nullptr;
|
| AppInfoDialog* dialog_ = nullptr; // Owned by |widget_|'s views hierarchy.
|
| +#if defined(OS_CHROMEOS)
|
| + std::unique_ptr<arc::FakeArcBridgeService> bridge_service_;
|
| + std::unique_ptr<arc::ArcAuthService> auth_service_;
|
| +#endif
|
|
|
| + private:
|
| DISALLOW_COPY_AND_ASSIGN(AppInfoDialogAshTest);
|
| };
|
|
|
|
|