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

Unified Diff: chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_ash_unittest.cc

Issue 2074543003: ARC: Add a link to "Manage supported links" in the Chrome app info dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased + GN changes. Created 4 years, 6 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/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..1754d69e408d971a9215426019e2021406affc39 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,13 @@ 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_.reset(new arc::FakeArcBridgeService());
Peter Kasting 2016/06/23 07:07:20 Nit: Prefer "= MakeUnique<>" where possible over b
mtomasz 2016/06/23 08:51:56 Done.
+ auth_service_.reset(new 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 +48,12 @@ class AppInfoDialogAshTest : public ash::test::AshTestBase {
void TearDown() override {
widget_->CloseNow();
+#if defined(OS_CHROMEOS)
+ if (auth_service_) {
+ auth_service_->Shutdown();
+ auth_service_ = nullptr;
Peter Kasting 2016/06/23 07:07:20 Nit: Is this important? Is someone going to read
mtomasz 2016/06/23 08:51:56 AFAIK it's a common practice, but I don't have str
+ }
+#endif
ash::test::AshTestBase::TearDown();
}
@@ -43,6 +61,10 @@ 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
DISALLOW_COPY_AND_ASSIGN(AppInfoDialogAshTest);
};

Powered by Google App Engine
This is Rietveld 408576698