chrome_app_list_test_support.cc revision e5d81f57cb97b3b6b7fccc9c5610d21eb81db09d
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_factory.h" 8#include "chrome/browser/ui/app_list/app_list_service.h" 9#include "chrome/browser/ui/app_list/app_list_syncable_service.h" 10#include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" 11#include "components/signin/core/browser/signin_manager.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