| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |