chrome_app_list_test_support.cc revision 5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7
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 3// found in the LICENSE file. 4 5#include "chrome/browser/ui/app_list/test/chrome_app_list_test_support.h" 6 7#include "chrome/browser/signin/signin_manager.h" 8#include "chrome/browser/signin/signin_manager_factory.h" 9#include "chrome/browser/ui/app_list/app_list_service.h" 10#include "chrome/browser/ui/app_list/app_list_syncable_service.h" 11#include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" 12 13namespace test { 14 15app_list::AppListModel* GetAppListModel(AppListService* service) { 16 return app_list::AppListSyncableServiceFactory::GetForProfile( 17 service->GetCurrentAppListProfile())->model(); 18} 19 20AppListService* GetAppListService() { 21 // TODO(tapted): Consider testing ash explicitly on the win-ash trybot. 22 return AppListService::Get(chrome::GetActiveDesktop()); 23} 24 25void SigninProfile(Profile* profile) { 26 SigninManagerFactory::GetForProfile(profile)-> 27 SetAuthenticatedUsername("user@example.com"); 28} 29 30} // namespace test 31