| Index: chrome/browser/ui/views/app_list/test/app_list_shower_unittest.cc
|
| diff --git a/chrome/browser/ui/views/app_list/test/app_list_shower_unittest.cc b/chrome/browser/ui/views/app_list/test/app_list_shower_unittest.cc
|
| index e15e7b8e8fcd2ee4203ca207b831e7d04e031a38..372a3312ee0514096ba076a3702f0494eb8311af 100644
|
| --- a/chrome/browser/ui/views/app_list/test/app_list_shower_unittest.cc
|
| +++ b/chrome/browser/ui/views/app_list/test/app_list_shower_unittest.cc
|
| @@ -4,11 +4,12 @@
|
|
|
| #include "base/files/file_path.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/ui/app_list/keep_alive_service.h"
|
| +#include "chrome/browser/ui/app_list/test/fake_keep_alive_service.h"
|
| #include "chrome/browser/ui/app_list/test/fake_profile.h"
|
| #include "chrome/browser/ui/views/app_list/app_list_shower.h"
|
| #include "chrome/browser/ui/views/app_list/app_list_view_factory.h"
|
| #include "chrome/browser/ui/views/app_list/app_list_view_win.h"
|
| -#include "chrome/browser/ui/views/app_list/keep_alive_service.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| class FakeView : public AppListViewWin {
|
| @@ -74,26 +75,6 @@ class FakeFactory : public AppListViewFactory {
|
| int views_created_;
|
| };
|
|
|
| -class FakeKeepAliveService : public KeepAliveService {
|
| - public:
|
| - FakeKeepAliveService()
|
| - : keeping_alive(false) {
|
| - }
|
| -
|
| - virtual ~FakeKeepAliveService() {
|
| - }
|
| -
|
| - virtual void EnsureKeepAlive() OVERRIDE {
|
| - keeping_alive = true;
|
| - }
|
| -
|
| - virtual void FreeKeepAlive() OVERRIDE {
|
| - keeping_alive = false;
|
| - }
|
| -
|
| - bool keeping_alive;
|
| -};
|
| -
|
| class AppListShowerUnitTest : public testing::Test {
|
| public:
|
| virtual void SetUp() OVERRIDE {
|
| @@ -128,14 +109,14 @@ class AppListShowerUnitTest : public testing::Test {
|
| TEST_F(AppListShowerUnitTest, Preconditions) {
|
| EXPECT_FALSE(shower_->IsAppListVisible());
|
| EXPECT_FALSE(shower_->HasView());
|
| - EXPECT_FALSE(keep_alive_service_->keeping_alive);
|
| + EXPECT_FALSE(keep_alive_service_->is_keeping_alive());
|
| }
|
|
|
| TEST_F(AppListShowerUnitTest, ShowForProfilePutsViewOnScreen) {
|
| shower_->ShowForProfile(profile1_.get());
|
| EXPECT_TRUE(shower_->IsAppListVisible());
|
| EXPECT_TRUE(shower_->HasView());
|
| - EXPECT_TRUE(keep_alive_service_->keeping_alive);
|
| + EXPECT_TRUE(keep_alive_service_->is_keeping_alive());
|
| }
|
|
|
| TEST_F(AppListShowerUnitTest, HidingViewRemovesKeepalive) {
|
| @@ -143,7 +124,7 @@ TEST_F(AppListShowerUnitTest, HidingViewRemovesKeepalive) {
|
| shower_->DismissAppList();
|
| EXPECT_FALSE(shower_->IsAppListVisible());
|
| EXPECT_TRUE(shower_->HasView());
|
| - EXPECT_FALSE(keep_alive_service_->keeping_alive);
|
| + EXPECT_FALSE(keep_alive_service_->is_keeping_alive());
|
| }
|
|
|
| TEST_F(AppListShowerUnitTest, HideAndShowReusesView) {
|
| @@ -165,7 +146,7 @@ TEST_F(AppListShowerUnitTest, CloseRemovesView) {
|
| shower_->CloseAppList();
|
| EXPECT_FALSE(shower_->IsAppListVisible());
|
| EXPECT_FALSE(shower_->HasView());
|
| - EXPECT_FALSE(keep_alive_service_->keeping_alive);
|
| + EXPECT_FALSE(keep_alive_service_->is_keeping_alive());
|
| }
|
|
|
| TEST_F(AppListShowerUnitTest, SwitchingProfiles) {
|
|
|