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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_test.cc

Issue 2205843004: [Merge to M53] arc: Initial implemetation of Chrome sync for Arc packages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_test.h ('k') | chrome/browser/ui/app_list/arc/arc_app_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/arc/arc_app_test.cc
diff --git a/chrome/browser/ui/app_list/arc/arc_app_test.cc b/chrome/browser/ui/app_list/arc/arc_app_test.cc
index 7ef0ed97cc8d140a74fe3fff576d0c70de568478..afc3697c2e4d4b460331843c4271e531acab2743 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_test.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_test.cc
@@ -110,26 +110,23 @@ void ArcAppTest::SetUp(Profile* profile) {
DCHECK(arc_app_list_pref_);
app_instance_.reset(new arc::FakeAppInstance(arc_app_list_pref_));
- arc::mojom::AppInstancePtr instance;
- app_instance_->Bind(mojo::GetProxy(&instance));
- bridge_service_->OnAppInstanceReady(std::move(instance));
- app_instance_->WaitForOnAppInstanceReady();
-
- // Check initial conditions.
- EXPECT_EQ(bridge_service_.get(), arc::ArcBridgeService::Get());
- EXPECT_TRUE(!arc::ArcBridgeService::Get()->available());
- EXPECT_EQ(arc::ArcBridgeService::State::STOPPED,
- arc::ArcBridgeService::Get()->state());
-
- // At this point we should have ArcAppListPrefs as observer of service.
- EXPECT_TRUE(bridge_service_->HasObserver(arc_app_list_pref_));
- bridge_service()->SetReady();
+ bridge_service_->app()->SetInstance(app_instance_.get());
}
void ArcAppTest::TearDown() {
auth_service_.reset();
}
+void ArcAppTest::StopArcInstance() {
+ bridge_service_->app()->CloseChannel();
+}
+
+void ArcAppTest::RestartArcInstance() {
+ bridge_service_->app()->CloseChannel();
+ app_instance_.reset(new arc::FakeAppInstance(arc_app_list_pref_));
+ bridge_service_->app()->SetInstance(app_instance_.get());
+}
+
void ArcAppTest::CreateUserAndLogin() {
const AccountId account_id(AccountId::FromUserEmailGaiaId(
profile_->GetProfileUserName(), "1234567890"));
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_test.h ('k') | chrome/browser/ui/app_list/arc/arc_app_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698