Index: chrome/browser/chromeos/preferences_browsertest.cc |
diff --git a/chrome/browser/chromeos/preferences_browsertest.cc b/chrome/browser/chromeos/preferences_browsertest.cc |
index 295bb9f6fc9dc8c491c0b9fe51d824403cc7d39d..1cc2d4df75fb31328f1cf0238c82963e874315e6 100644 |
--- a/chrome/browser/chromeos/preferences_browsertest.cc |
+++ b/chrome/browser/chromeos/preferences_browsertest.cc |
@@ -18,6 +18,7 @@ |
#include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" |
#include "chrome/browser/chromeos/system/fake_input_device_settings.h" |
#include "chrome/browser/feedback/tracing_manager.h" |
+#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/pref_names.h" |
#include "chromeos/chromeos_switches.h" |
@@ -115,6 +116,14 @@ class PreferencesTest : public LoginManagerTest { |
prefs->GetBoolean(prefs::kPrimaryMouseButtonRight)); |
} |
+ void DisableAnimations() { |
+ // Disable animations for user transitions. |
+ chrome::MultiUserWindowManagerChromeOS* manager = |
+ static_cast<chrome::MultiUserWindowManagerChromeOS*>( |
+ chrome::MultiUserWindowManager::GetInstance()); |
+ manager->SetAnimationsForTest(true); |
+ } |
+ |
private: |
system::FakeInputDeviceSettings* input_settings_; |
input_method::FakeXKeyboard* xkeyboard_; |
@@ -154,6 +163,7 @@ IN_PROC_BROWSER_TEST_F(PreferencesTest, MultiProfiles) { |
CheckSettingsCorrespondToPrefs(prefs1); |
// Switch user and check that settings was changed accordingly. |
+ DisableAnimations(); |
user_manager->SwitchActiveUser(kTestUsers[1]); |
EXPECT_TRUE(user2->is_active()); |
CheckSettingsCorrespondToPrefs(prefs2); |