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

Unified Diff: chrome/browser/chromeos/display/display_preferences_unittest.cc

Issue 1261693004: Allow dynamic enabling/disabling of unified desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/display/display_preferences_unittest.cc
diff --git a/chrome/browser/chromeos/display/display_preferences_unittest.cc b/chrome/browser/chromeos/display/display_preferences_unittest.cc
index eb065ad0f84c58f581f248b6f05181d7eecaab59..07c0514d434de50fbbf811e9b3bcc4addbf9c2e3 100644
--- a/chrome/browser/chromeos/display/display_preferences_unittest.cc
+++ b/chrome/browser/chromeos/display/display_preferences_unittest.cc
@@ -876,11 +876,11 @@ TEST_F(DisplayPreferencesTest, RotationLockTriggersStore) {
}
TEST_F(DisplayPreferencesTest, SaveUnifiedMode) {
- ash::test::DisplayManagerTestApi::EnableUnifiedDesktopForTest();
LoggedInAsUser();
ash::DisplayManager* display_manager =
ash::Shell::GetInstance()->display_manager();
+ display_manager->SetUnifiedDesktopEnabled(true);
UpdateDisplay("200x200,100x100");
ash::DisplayIdPair pair = display_manager->GetCurrentDisplayIdPair();
@@ -928,7 +928,8 @@ TEST_F(DisplayPreferencesTest, SaveUnifiedMode) {
EXPECT_FALSE(stored_layout.mirrored);
// Exit unified mode.
- display_manager->SetDefaultMultiDisplayMode(ash::DisplayManager::EXTENDED);
+ display_manager->SetDefaultMultiDisplayModeForCurrentDisplays(
+ ash::DisplayManager::EXTENDED);
display_manager->ReconfigureDisplays();
ASSERT_TRUE(
secondary_displays->GetDictionary(ToPairString(pair), &new_value));
@@ -953,7 +954,7 @@ TEST_F(DisplayPreferencesTest, RestoreUnifiedMode) {
EXPECT_FALSE(display_manager->IsInUnifiedMode());
// Restored to unified.
- ash::test::DisplayManagerTestApi::EnableUnifiedDesktopForTest();
+ display_manager->SetUnifiedDesktopEnabled(true);
StoreDisplayBoolPropertyForPair(pair, "default_unified", true);
LoadDisplayPreferences(false);
UpdateDisplay("100x100,200x200");
« no previous file with comments | « ash/test/display_manager_test_api.cc ('k') | chrome/browser/ui/webui/options/chromeos/display_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698