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

Unified Diff: chrome/browser/chromeos/preferences_browsertest.cc

Issue 223823004: Improving the user transition to add special cases for maximized windows and make the transition "m… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed preferences browser test [disabling animations] 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 side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698