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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc

Issue 2507073002: Split ArcSessionManager from ArcAuthService. (Closed)
Patch Set: Fix rebase mistake 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 arc_test_.app_instance()->SendRefreshAppList(arc_test_.fake_apps()); 802 arc_test_.app_instance()->SendRefreshAppList(arc_test_.fake_apps());
803 } 803 }
804 804
805 void UninstallArcApps() { 805 void UninstallArcApps() {
806 arc_test_.app_instance()->RefreshAppList(); 806 arc_test_.app_instance()->RefreshAppList();
807 arc_test_.app_instance()->SendRefreshAppList( 807 arc_test_.app_instance()->SendRefreshAppList(
808 std::vector<arc::mojom::AppInfo>()); 808 std::vector<arc::mojom::AppInfo>());
809 } 809 }
810 810
811 void EnableArc(bool enable) { 811 void EnableArc(bool enable) {
812 enable ? arc_test_.arc_auth_service()->EnableArc() 812 enable ? arc_test_.arc_session_manager()->EnableArc()
813 : arc_test_.arc_auth_service()->DisableArc(); 813 : arc_test_.arc_session_manager()->DisableArc();
814 arc_test_.arc_auth_service()->OnSyncedPrefChanged(prefs::kArcEnabled, 814 arc_test_.arc_session_manager()->OnSyncedPrefChanged(prefs::kArcEnabled,
815 false); 815 false);
816 base::RunLoop().RunUntilIdle(); 816 base::RunLoop().RunUntilIdle();
817 } 817 }
818 818
819 void EnableTabletMode(bool enable) { 819 void EnableTabletMode(bool enable) {
820 ash::MaximizeModeController* controller = 820 ash::MaximizeModeController* controller =
821 ash::WmShell::Get()->maximize_mode_controller(); 821 ash::WmShell::Get()->maximize_mode_controller();
822 controller->EnableMaximizeModeWindowManager(enable); 822 controller->EnableMaximizeModeWindowManager(enable);
823 } 823 }
824 824
825 void ValidateArcState(bool arc_enabled, 825 void ValidateArcState(bool arc_enabled,
826 bool arc_managed, 826 bool arc_managed,
827 arc::ArcAuthService::State state, 827 arc::ArcSessionManager::State state,
828 const std::string& pin_status) { 828 const std::string& pin_status) {
829 EXPECT_EQ(arc_managed, arc_test_.arc_auth_service()->IsArcManaged()); 829 EXPECT_EQ(arc_managed, arc_test_.arc_session_manager()->IsArcManaged());
830 EXPECT_EQ(arc_enabled, arc_test_.arc_auth_service()->IsArcEnabled()); 830 EXPECT_EQ(arc_enabled, arc_test_.arc_session_manager()->IsArcEnabled());
831 EXPECT_EQ(state, arc_test_.arc_auth_service()->state()); 831 EXPECT_EQ(state, arc_test_.arc_session_manager()->state());
832 EXPECT_EQ(pin_status, GetPinnedAppStatus()); 832 EXPECT_EQ(pin_status, GetPinnedAppStatus());
833 } 833 }
834 834
835 // Creates app window and set optional Arc application id. 835 // Creates app window and set optional Arc application id.
836 views::Widget* CreateArcWindow(std::string& window_app_id) { 836 views::Widget* CreateArcWindow(std::string& window_app_id) {
837 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); 837 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
838 params.bounds = gfx::Rect(5, 5, 20, 20); 838 params.bounds = gfx::Rect(5, 5, 20, 20);
839 params.context = GetContext(); 839 params.context = GetContext();
840 views::Widget* widget = new views::Widget(); 840 views::Widget* widget = new views::Widget();
841 widget->Init(params); 841 widget->Init(params);
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 2020
2021 EXPECT_EQ("AppList, Chrome, App1, Fake App 0, App2", GetPinnedAppStatus()); 2021 EXPECT_EQ("AppList, Chrome, App1, Fake App 0, App2", GetPinnedAppStatus());
2022 UninstallArcApps(); 2022 UninstallArcApps();
2023 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); 2023 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus());
2024 SendListOfArcApps(); 2024 SendListOfArcApps();
2025 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); 2025 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus());
2026 2026
2027 // Disable/Enable Arc should persist pin state. 2027 // Disable/Enable Arc should persist pin state.
2028 launcher_controller_->PinAppWithID(arc_app_id); 2028 launcher_controller_->PinAppWithID(arc_app_id);
2029 EXPECT_EQ("AppList, Chrome, App1, App2, Fake App 0", GetPinnedAppStatus()); 2029 EXPECT_EQ("AppList, Chrome, App1, App2, Fake App 0", GetPinnedAppStatus());
2030 arc::ArcAuthService::Get()->Shutdown(); 2030 arc::ArcSessionManager::Get()->Shutdown();
2031 EXPECT_EQ("AppList, Chrome, App1, App2, Fake App 0", GetPinnedAppStatus()); 2031 EXPECT_EQ("AppList, Chrome, App1, App2, Fake App 0", GetPinnedAppStatus());
2032 arc::ArcAuthService::Get()->OnPrimaryUserProfilePrepared(profile()); 2032 arc::ArcSessionManager::Get()->OnPrimaryUserProfilePrepared(profile());
2033 EXPECT_EQ("AppList, Chrome, App1, App2, Fake App 0", GetPinnedAppStatus()); 2033 EXPECT_EQ("AppList, Chrome, App1, App2, Fake App 0", GetPinnedAppStatus());
2034 2034
2035 // Opt-Out/Opt-In remove item from the shelf. 2035 // Opt-Out/Opt-In remove item from the shelf.
2036 EnableArc(false); 2036 EnableArc(false);
2037 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); 2037 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus());
2038 EnableArc(true); 2038 EnableArc(true);
2039 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); 2039 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus());
2040 SendListOfArcApps(); 2040 SendListOfArcApps();
2041 EXPECT_EQ("AppList, Chrome, App1, App2, Fake App 0", GetPinnedAppStatus()); 2041 EXPECT_EQ("AppList, Chrome, App1, App2, Fake App 0", GetPinnedAppStatus());
2042 } 2042 }
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
3554 EXPECT_EQ(AppListControllerDelegate::PIN_FIXED, 3554 EXPECT_EQ(AppListControllerDelegate::PIN_FIXED,
3555 GetPinnableForAppID(app_id, profile())); 3555 GetPinnableForAppID(app_id, profile()));
3556 } 3556 }
3557 3557
3558 TEST_F(ChromeLauncherControllerImplWithArcTest, ArcManaged) { 3558 TEST_F(ChromeLauncherControllerImplWithArcTest, ArcManaged) {
3559 extension_service_->AddExtension(arc_support_host_.get()); 3559 extension_service_->AddExtension(arc_support_host_.get());
3560 // Test enables Arc, so turn it off for initial values. 3560 // Test enables Arc, so turn it off for initial values.
3561 EnableArc(false); 3561 EnableArc(false);
3562 3562
3563 InitLauncherController(); 3563 InitLauncherController();
3564 arc::ArcAuthService::SetShelfDelegateForTesting(launcher_controller_.get()); 3564 arc::ArcSessionManager::SetShelfDelegateForTesting(
3565 launcher_controller_.get());
3565 3566
3566 // Initial run, Arc is not managed and disabled, Play Store pin should be 3567 // Initial run, Arc is not managed and disabled, Play Store pin should be
3567 // available. 3568 // available.
3568 ValidateArcState(false, false, arc::ArcAuthService::State::STOPPED, 3569 ValidateArcState(false, false, arc::ArcSessionManager::State::STOPPED,
3569 "AppList, Chrome, Play Store"); 3570 "AppList, Chrome, Play Store");
3570 3571
3571 // Arc is managed and enabled, Play Store pin should be available. 3572 // Arc is managed and enabled, Play Store pin should be available.
3572 // Note: SHOWING_TERMS_OF_SERVICE here means that opt-in flow starts. 3573 // Note: SHOWING_TERMS_OF_SERVICE here means that opt-in flow starts.
3573 profile()->GetTestingPrefService()->SetManagedPref( 3574 profile()->GetTestingPrefService()->SetManagedPref(
3574 prefs::kArcEnabled, new base::FundamentalValue(true)); 3575 prefs::kArcEnabled, new base::FundamentalValue(true));
3575 base::RunLoop().RunUntilIdle(); 3576 base::RunLoop().RunUntilIdle();
3576 ValidateArcState(true, true, 3577 ValidateArcState(true, true,
3577 arc::ArcAuthService::State::SHOWING_TERMS_OF_SERVICE, 3578 arc::ArcSessionManager::State::SHOWING_TERMS_OF_SERVICE,
3578 "AppList, Chrome, Play Store"); 3579 "AppList, Chrome, Play Store");
3579 3580
3580 // Arc is managed and disabled, Play Store pin should not be available. 3581 // Arc is managed and disabled, Play Store pin should not be available.
3581 profile()->GetTestingPrefService()->SetManagedPref( 3582 profile()->GetTestingPrefService()->SetManagedPref(
3582 prefs::kArcEnabled, new base::FundamentalValue(false)); 3583 prefs::kArcEnabled, new base::FundamentalValue(false));
3583 base::RunLoop().RunUntilIdle(); 3584 base::RunLoop().RunUntilIdle();
3584 ValidateArcState(false, true, arc::ArcAuthService::State::STOPPED, 3585 ValidateArcState(false, true, arc::ArcSessionManager::State::STOPPED,
3585 "AppList, Chrome"); 3586 "AppList, Chrome");
3586 3587
3587 // Arc is not managed and disabled, Play Store pin should be available. 3588 // Arc is not managed and disabled, Play Store pin should be available.
3588 profile()->GetTestingPrefService()->RemoveManagedPref(prefs::kArcEnabled); 3589 profile()->GetTestingPrefService()->RemoveManagedPref(prefs::kArcEnabled);
3589 base::RunLoop().RunUntilIdle(); 3590 base::RunLoop().RunUntilIdle();
3590 ValidateArcState(false, false, arc::ArcAuthService::State::STOPPED, 3591 ValidateArcState(false, false, arc::ArcSessionManager::State::STOPPED,
3591 "AppList, Chrome, Play Store"); 3592 "AppList, Chrome, Play Store");
3592 3593
3593 // Arc is not managed and enabled, Play Store pin should be available. 3594 // Arc is not managed and enabled, Play Store pin should be available.
3594 EnableArc(true); 3595 EnableArc(true);
3595 ValidateArcState(true, false, 3596 ValidateArcState(true, false,
3596 arc::ArcAuthService::State::SHOWING_TERMS_OF_SERVICE, 3597 arc::ArcSessionManager::State::SHOWING_TERMS_OF_SERVICE,
3597 "AppList, Chrome, Play Store"); 3598 "AppList, Chrome, Play Store");
3598 3599
3599 // User disables Arc. Arc is not managed and disabled, Play Store pin should 3600 // User disables Arc. Arc is not managed and disabled, Play Store pin should
3600 // be automatically removed. 3601 // be automatically removed.
3601 EnableArc(false); 3602 EnableArc(false);
3602 ValidateArcState(false, false, arc::ArcAuthService::State::STOPPED, 3603 ValidateArcState(false, false, arc::ArcSessionManager::State::STOPPED,
3603 "AppList, Chrome"); 3604 "AppList, Chrome");
3604 3605
3605 // Even if re-enable it again, Play Store pin does not appear automatically. 3606 // Even if re-enable it again, Play Store pin does not appear automatically.
3606 EnableArc(true); 3607 EnableArc(true);
3607 ValidateArcState(true, false, 3608 ValidateArcState(true, false,
3608 arc::ArcAuthService::State::SHOWING_TERMS_OF_SERVICE, 3609 arc::ArcSessionManager::State::SHOWING_TERMS_OF_SERVICE,
3609 "AppList, Chrome"); 3610 "AppList, Chrome");
3610 } 3611 }
3611 3612
3612 namespace { 3613 namespace {
3613 3614
3614 class ChromeLauncherControllerOrientationTest 3615 class ChromeLauncherControllerOrientationTest
3615 : public ChromeLauncherControllerImplWithArcTest { 3616 : public ChromeLauncherControllerImplWithArcTest {
3616 public: 3617 public:
3617 ChromeLauncherControllerOrientationTest() {} 3618 ChromeLauncherControllerOrientationTest() {}
3618 ~ChromeLauncherControllerOrientationTest() override {} 3619 ~ChromeLauncherControllerOrientationTest() override {}
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
3704 } // namespace 3705 } // namespace
3705 3706
3706 TEST_F(ChromeLauncherControllerOrientationTest, 3707 TEST_F(ChromeLauncherControllerOrientationTest,
3707 ArcOrientationLockBeforeWindowReady) { 3708 ArcOrientationLockBeforeWindowReady) {
3708 ASSERT_TRUE(display::Display::HasInternalDisplay()); 3709 ASSERT_TRUE(display::Display::HasInternalDisplay());
3709 3710
3710 extension_service_->AddExtension(arc_support_host_.get()); 3711 extension_service_->AddExtension(arc_support_host_.get());
3711 EnableArc(true); 3712 EnableArc(true);
3712 3713
3713 InitLauncherController(); 3714 InitLauncherController();
3714 arc::ArcAuthService::SetShelfDelegateForTesting(launcher_controller_.get()); 3715 arc::ArcSessionManager::SetShelfDelegateForTesting(
3716 launcher_controller_.get());
3715 3717
3716 ash::ScreenOrientationController* controller = 3718 ash::ScreenOrientationController* controller =
3717 ash::Shell::GetInstance()->screen_orientation_controller(); 3719 ash::Shell::GetInstance()->screen_orientation_controller();
3718 3720
3719 std::string app_id1("org.chromium.arc.1"); 3721 std::string app_id1("org.chromium.arc.1");
3720 int task_id1 = 1; 3722 int task_id1 = 1;
3721 arc::mojom::AppInfo appinfo1 = 3723 arc::mojom::AppInfo appinfo1 =
3722 CreateAppInfo("Test1", "test", "com.example.app", OrientationLock::NONE); 3724 CreateAppInfo("Test1", "test", "com.example.app", OrientationLock::NONE);
3723 3725
3724 AddArcAppAndShortcut(appinfo1); 3726 AddArcAppAndShortcut(appinfo1);
(...skipping 30 matching lines...) Expand all
3755 } 3757 }
3756 3758
3757 TEST_F(ChromeLauncherControllerOrientationTest, ArcOrientationLock) { 3759 TEST_F(ChromeLauncherControllerOrientationTest, ArcOrientationLock) {
3758 ASSERT_TRUE(display::Display::HasInternalDisplay()); 3760 ASSERT_TRUE(display::Display::HasInternalDisplay());
3759 3761
3760 extension_service_->AddExtension(arc_support_host_.get()); 3762 extension_service_->AddExtension(arc_support_host_.get());
3761 EnableArc(true); 3763 EnableArc(true);
3762 EnableTabletMode(true); 3764 EnableTabletMode(true);
3763 3765
3764 InitLauncherController(); 3766 InitLauncherController();
3765 arc::ArcAuthService::SetShelfDelegateForTesting(launcher_controller_.get()); 3767 arc::ArcSessionManager::SetShelfDelegateForTesting(
3768 launcher_controller_.get());
3766 3769
3767 InitApps(); 3770 InitApps();
3768 ash::ScreenOrientationController* controller = 3771 ash::ScreenOrientationController* controller =
3769 ash::Shell::GetInstance()->screen_orientation_controller(); 3772 ash::Shell::GetInstance()->screen_orientation_controller();
3770 3773
3771 // Activating a window with NON orientation unlocks the screen. 3774 // Activating a window with NON orientation unlocks the screen.
3772 window_none_->Activate(); 3775 window_none_->Activate();
3773 EXPECT_FALSE(controller->rotation_locked()); 3776 EXPECT_FALSE(controller->rotation_locked());
3774 EXPECT_EQ(display::Display::ROTATE_0, 3777 EXPECT_EQ(display::Display::ROTATE_0,
3775 display::Screen::GetScreen()->GetPrimaryDisplay().rotation()); 3778 display::Screen::GetScreen()->GetPrimaryDisplay().rotation());
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
3853 } 3856 }
3854 3857
3855 TEST_F(ChromeLauncherControllerOrientationTest, CurrentWithLandscapeDisplay) { 3858 TEST_F(ChromeLauncherControllerOrientationTest, CurrentWithLandscapeDisplay) {
3856 ASSERT_TRUE(display::Display::HasInternalDisplay()); 3859 ASSERT_TRUE(display::Display::HasInternalDisplay());
3857 3860
3858 extension_service_->AddExtension(arc_support_host_.get()); 3861 extension_service_->AddExtension(arc_support_host_.get());
3859 EnableArc(true); 3862 EnableArc(true);
3860 EnableTabletMode(true); 3863 EnableTabletMode(true);
3861 3864
3862 InitLauncherController(); 3865 InitLauncherController();
3863 arc::ArcAuthService::SetShelfDelegateForTesting(launcher_controller_.get()); 3866 arc::ArcSessionManager::SetShelfDelegateForTesting(
3867 launcher_controller_.get());
3864 3868
3865 InitApps(); 3869 InitApps();
3866 ash::ScreenOrientationController* controller = 3870 ash::ScreenOrientationController* controller =
3867 ash::Shell::GetInstance()->screen_orientation_controller(); 3871 ash::Shell::GetInstance()->screen_orientation_controller();
3868 3872
3869 // Start with portrait. 3873 // Start with portrait.
3870 window_portrait_->Activate(); 3874 window_portrait_->Activate();
3871 3875
3872 // Create a arc window to lock the CURRENT orientation. 3876 // Create a arc window to lock the CURRENT orientation.
3873 views::Widget* window_current = CreateArcWindow(window_app_id_current_); 3877 views::Widget* window_current = CreateArcWindow(window_app_id_current_);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
3911 OrientationLock::CURRENT); 3915 OrientationLock::CURRENT);
3912 EXPECT_TRUE(controller->rotation_locked()); 3916 EXPECT_TRUE(controller->rotation_locked());
3913 EXPECT_EQ(display::Display::ROTATE_0, 3917 EXPECT_EQ(display::Display::ROTATE_0,
3914 display::Screen::GetScreen()->GetPrimaryDisplay().rotation()); 3918 display::Screen::GetScreen()->GetPrimaryDisplay().rotation());
3915 } 3919 }
3916 3920
3917 TEST_F(ChromeLauncherControllerArcDefaultAppsTest, DefaultApps) { 3921 TEST_F(ChromeLauncherControllerArcDefaultAppsTest, DefaultApps) {
3918 arc_test_.SetUp(profile()); 3922 arc_test_.SetUp(profile());
3919 InitLauncherController(); 3923 InitLauncherController();
3920 ChromeLauncherController::set_instance_for_test(launcher_controller_.get()); 3924 ChromeLauncherController::set_instance_for_test(launcher_controller_.get());
3921 arc::ArcAuthService::SetShelfDelegateForTesting(launcher_controller_.get()); 3925 arc::ArcSessionManager::SetShelfDelegateForTesting(
3926 launcher_controller_.get());
3922 3927
3923 ArcAppListPrefs* const prefs = arc_test_.arc_app_list_prefs(); 3928 ArcAppListPrefs* const prefs = arc_test_.arc_app_list_prefs();
3924 EnableArc(false); 3929 EnableArc(false);
3925 EXPECT_FALSE(arc_test_.arc_auth_service()->IsArcEnabled()); 3930 EXPECT_FALSE(arc_test_.arc_session_manager()->IsArcEnabled());
3926 ASSERT_TRUE(prefs->GetAppIds().size()); 3931 ASSERT_TRUE(prefs->GetAppIds().size());
3927 3932
3928 const std::string app_id = 3933 const std::string app_id =
3929 ArcAppTest::GetAppId(arc_test_.fake_default_apps()[0]); 3934 ArcAppTest::GetAppId(arc_test_.fake_default_apps()[0]);
3930 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(app_id)); 3935 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(app_id));
3931 EXPECT_TRUE(arc::LaunchApp(profile(), app_id)); 3936 EXPECT_TRUE(arc::LaunchApp(profile(), app_id));
3932 EXPECT_TRUE(arc_test_.arc_auth_service()->IsArcEnabled()); 3937 EXPECT_TRUE(arc_test_.arc_session_manager()->IsArcEnabled());
3933 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id)); 3938 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id));
3934 3939
3935 // Stop Arc again. Shelf item should go away. 3940 // Stop Arc again. Shelf item should go away.
3936 EnableArc(false); 3941 EnableArc(false);
3937 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(app_id)); 3942 EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(app_id));
3938 3943
3939 EXPECT_TRUE(arc::LaunchApp(profile(), app_id)); 3944 EXPECT_TRUE(arc::LaunchApp(profile(), app_id));
3940 EXPECT_TRUE(arc_test_.arc_auth_service()->IsArcEnabled()); 3945 EXPECT_TRUE(arc_test_.arc_session_manager()->IsArcEnabled());
3941 3946
3942 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id)); 3947 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id));
3943 EXPECT_TRUE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id)); 3948 EXPECT_TRUE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id));
3944 3949
3945 std::string window_app_id("org.chromium.arc.1"); 3950 std::string window_app_id("org.chromium.arc.1");
3946 CreateArcWindow(window_app_id); 3951 CreateArcWindow(window_app_id);
3947 arc_test_.app_instance()->SendTaskCreated(1, 3952 arc_test_.app_instance()->SendTaskCreated(1,
3948 arc_test_.fake_default_apps()[0]); 3953 arc_test_.fake_default_apps()[0]);
3949 3954
3950 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id)); 3955 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id));
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
4025 4030
4026 // Pinned state should not change. 4031 // Pinned state should not change.
4027 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); 4032 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus());
4028 launcher_controller_->UnpinAppWithID(extension2_->id()); 4033 launcher_controller_->UnpinAppWithID(extension2_->id());
4029 EXPECT_EQ("AppList, Chrome, App1", GetPinnedAppStatus()); 4034 EXPECT_EQ("AppList, Chrome, App1", GetPinnedAppStatus());
4030 4035
4031 // Resume syncing and sync information overrides local copy. 4036 // Resume syncing and sync information overrides local copy.
4032 StartAppSyncService(copy_sync_list); 4037 StartAppSyncService(copy_sync_list);
4033 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); 4038 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus());
4034 } 4039 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698