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/display/display_controller.h" | 10 #include "ash/display/display_controller.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 .WillRepeatedly(testing::Return(true)); | 68 .WillRepeatedly(testing::Return(true)); |
69 EXPECT_CALL(*mock_user_manager_, IsLoggedInAsRegularUser()) | 69 EXPECT_CALL(*mock_user_manager_, IsLoggedInAsRegularUser()) |
70 .WillRepeatedly(testing::Return(true)); | 70 .WillRepeatedly(testing::Return(true)); |
71 } | 71 } |
72 | 72 |
73 void LoggedInAsGuest() { | 73 void LoggedInAsGuest() { |
74 EXPECT_CALL(*mock_user_manager_, IsUserLoggedIn()) | 74 EXPECT_CALL(*mock_user_manager_, IsUserLoggedIn()) |
75 .WillRepeatedly(testing::Return(true)); | 75 .WillRepeatedly(testing::Return(true)); |
76 EXPECT_CALL(*mock_user_manager_, IsLoggedInAsRegularUser()) | 76 EXPECT_CALL(*mock_user_manager_, IsLoggedInAsRegularUser()) |
77 .WillRepeatedly(testing::Return(false)); | 77 .WillRepeatedly(testing::Return(false)); |
78 EXPECT_CALL(*mock_user_manager_, IsLoggedInAsLocallyManagedUser()) | 78 EXPECT_CALL(*mock_user_manager_, IsLoggedInAsSupervisedUser()) |
79 .WillRepeatedly(testing::Return(false)); | 79 .WillRepeatedly(testing::Return(false)); |
80 } | 80 } |
81 | 81 |
82 // Do not use the implementation of display_preferences.cc directly to avoid | 82 // Do not use the implementation of display_preferences.cc directly to avoid |
83 // notifying the update to the system. | 83 // notifying the update to the system. |
84 void StoreDisplayLayoutPrefForName(const std::string& name, | 84 void StoreDisplayLayoutPrefForName(const std::string& name, |
85 ash::DisplayLayout::Position layout, | 85 ash::DisplayLayout::Position layout, |
86 int offset, | 86 int offset, |
87 int64 primary_id) { | 87 int64 primary_id) { |
88 DictionaryPrefUpdate update(&local_state_, prefs::kSecondaryDisplays); | 88 DictionaryPrefUpdate update(&local_state_, prefs::kSecondaryDisplays); |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 local_state()->GetDictionary(prefs::kDisplayProperties); | 657 local_state()->GetDictionary(prefs::kDisplayProperties); |
658 const base::DictionaryValue* property = NULL; | 658 const base::DictionaryValue* property = NULL; |
659 EXPECT_TRUE(properties->GetDictionary( | 659 EXPECT_TRUE(properties->GetDictionary( |
660 base::Int64ToString(gfx::Display::InternalDisplayId()), &property)); | 660 base::Int64ToString(gfx::Display::InternalDisplayId()), &property)); |
661 int rotation = -1; | 661 int rotation = -1; |
662 EXPECT_TRUE(property->GetInteger("rotation", &rotation)); | 662 EXPECT_TRUE(property->GetInteger("rotation", &rotation)); |
663 EXPECT_EQ(gfx::Display::ROTATE_0, rotation); | 663 EXPECT_EQ(gfx::Display::ROTATE_0, rotation); |
664 } | 664 } |
665 | 665 |
666 } // namespace chromeos | 666 } // namespace chromeos |
OLD | NEW |