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

Side by Side Diff: chrome/browser/chromeos/display/display_preferences_unittest.cc

Issue 1263853002: Unified Desktop: Support 2xDSF display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « ash/host/ash_window_tree_host_unified.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/display/display_preferences.h" 5 #include "chrome/browser/chromeos/display/display_preferences.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/content/display/screen_orientation_controller_chromeos.h" 10 #include "ash/content/display/screen_orientation_controller_chromeos.h"
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 EXPECT_TRUE(properties->GetBoolean("lock", &rotation_lock)); 875 EXPECT_TRUE(properties->GetBoolean("lock", &rotation_lock));
876 } 876 }
877 877
878 TEST_F(DisplayPreferencesTest, SaveUnifiedMode) { 878 TEST_F(DisplayPreferencesTest, SaveUnifiedMode) {
879 ash::test::DisplayManagerTestApi::EnableUnifiedDesktopForTest(); 879 ash::test::DisplayManagerTestApi::EnableUnifiedDesktopForTest();
880 880
881 LoggedInAsUser(); 881 LoggedInAsUser();
882 ash::DisplayManager* display_manager = 882 ash::DisplayManager* display_manager =
883 ash::Shell::GetInstance()->display_manager(); 883 ash::Shell::GetInstance()->display_manager();
884 884
885 UpdateDisplay("100x100,200x200"); 885 UpdateDisplay("200x200,100x100");
886 ash::DisplayIdPair pair = display_manager->GetCurrentDisplayIdPair(); 886 ash::DisplayIdPair pair = display_manager->GetCurrentDisplayIdPair();
887 EXPECT_EQ( 887 EXPECT_EQ(
888 "400x200", 888 "400x200",
889 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().size().ToString()); 889 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().size().ToString());
890 890
891 const base::DictionaryValue* secondary_displays = 891 const base::DictionaryValue* secondary_displays =
892 local_state()->GetDictionary(prefs::kSecondaryDisplays); 892 local_state()->GetDictionary(prefs::kSecondaryDisplays);
893 const base::DictionaryValue* new_value = NULL; 893 const base::DictionaryValue* new_value = NULL;
894 EXPECT_TRUE( 894 EXPECT_TRUE(
895 secondary_displays->GetDictionary(ToPairString(pair), &new_value)); 895 secondary_displays->GetDictionary(ToPairString(pair), &new_value));
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 // Sanity check. Restore to extended. 972 // Sanity check. Restore to extended.
973 StoreDisplayBoolPropertyForPair(pair, "default_unified", false); 973 StoreDisplayBoolPropertyForPair(pair, "default_unified", false);
974 StoreDisplayBoolPropertyForPair(pair, "mirrored", false); 974 StoreDisplayBoolPropertyForPair(pair, "mirrored", false);
975 LoadDisplayPreferences(false); 975 LoadDisplayPreferences(false);
976 UpdateDisplay("100x100,200x200"); 976 UpdateDisplay("100x100,200x200");
977 EXPECT_FALSE(display_manager->IsInMirrorMode()); 977 EXPECT_FALSE(display_manager->IsInMirrorMode());
978 EXPECT_FALSE(display_manager->IsInUnifiedMode()); 978 EXPECT_FALSE(display_manager->IsInUnifiedMode());
979 } 979 }
980 980
981 } // namespace chromeos 981 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/host/ash_window_tree_host_unified.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698