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

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

Issue 232133003: Fixing too long running unit tests on valgrind (produced by user switch animation) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self nit Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
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.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 return profile; 873 return profile;
874 } 874 }
875 875
876 // Switch to another user. 876 // Switch to another user.
877 void SwitchActiveUser(const std::string& name) { 877 void SwitchActiveUser(const std::string& name) {
878 session_delegate()->SwitchActiveUser(name); 878 session_delegate()->SwitchActiveUser(name);
879 GetFakeUserManager()->SwitchActiveUser(name); 879 GetFakeUserManager()->SwitchActiveUser(name);
880 chrome::MultiUserWindowManagerChromeOS* manager = 880 chrome::MultiUserWindowManagerChromeOS* manager =
881 static_cast<chrome::MultiUserWindowManagerChromeOS*>( 881 static_cast<chrome::MultiUserWindowManagerChromeOS*>(
882 chrome::MultiUserWindowManager::GetInstance()); 882 chrome::MultiUserWindowManager::GetInstance());
883 manager->SetAnimationsForTest(true); 883 manager->SetAnimationSpeedForTest(
884 chrome::MultiUserWindowManagerChromeOS::ANIMATION_SPEED_DISABLED);
884 manager->ActiveUserChanged(name); 885 manager->ActiveUserChanged(name);
885 launcher_controller_->browser_status_monitor_for_test()-> 886 launcher_controller_->browser_status_monitor_for_test()->
886 ActiveUserChanged(name); 887 ActiveUserChanged(name);
887 launcher_controller_->app_window_controller_for_test()-> 888 launcher_controller_->app_window_controller_for_test()->
888 ActiveUserChanged(name); 889 ActiveUserChanged(name);
889 } 890 }
890 891
891 // Creates a browser with a |profile| and load a tab with a |title| and |url|. 892 // Creates a browser with a |profile| and load a tab with a |title| and |url|.
892 Browser* CreateBrowserAndTabWithProfile(Profile* profile, 893 Browser* CreateBrowserAndTabWithProfile(Profile* profile,
893 const std::string& title, 894 const std::string& title,
(...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after
2838 2839
2839 EXPECT_EQ(1, app_icon_loader->fetch_count()); 2840 EXPECT_EQ(1, app_icon_loader->fetch_count());
2840 ASSERT_EQ(initial_size + 1, model_->items().size()); 2841 ASSERT_EQ(initial_size + 1, model_->items().size());
2841 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); 2842 EXPECT_TRUE(launcher_controller_->IsAppPinned("1"));
2842 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); 2843 EXPECT_FALSE(launcher_controller_->IsAppPinned("0"));
2843 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); 2844 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type);
2844 2845
2845 launcher_controller_->UnpinAppWithID("1"); 2846 launcher_controller_->UnpinAppWithID("1");
2846 ASSERT_EQ(initial_size, model_->items().size()); 2847 ASSERT_EQ(initial_size, model_->items().size());
2847 } 2848 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698