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

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

Issue 18413002: [Cleanup] Factor out layout store code from DisplayController (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
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 "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/display/display_layout_store.h"
8 #include "ash/display/display_manager.h" 9 #include "ash/display/display_manager.h"
9 #include "ash/screen_ash.h" 10 #include "ash/screen_ash.h"
10 #include "ash/shell.h" 11 #include "ash/shell.h"
11 #include "ash/test/ash_test_base.h" 12 #include "ash/test/ash_test_base.h"
12 #include "base/prefs/testing_pref_service.h" 13 #include "base/prefs/testing_pref_service.h"
13 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
14 #include "base/values.h" 15 #include "base/values.h"
15 #include "chrome/browser/chromeos/display/display_configuration_observer.h" 16 #include "chrome/browser/chromeos/display/display_configuration_observer.h"
16 #include "chrome/browser/chromeos/login/mock_user_manager.h" 17 #include "chrome/browser/chromeos/login/mock_user_manager.h"
17 #include "chrome/browser/chromeos/login/user_manager.h" 18 #include "chrome/browser/chromeos/login/user_manager.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 insets_value->SetInteger("insets_left", insets.left()); 124 insets_value->SetInteger("insets_left", insets.left());
124 insets_value->SetInteger("insets_bottom", insets.bottom()); 125 insets_value->SetInteger("insets_bottom", insets.bottom());
125 insets_value->SetInteger("insets_right", insets.right()); 126 insets_value->SetInteger("insets_right", insets.right());
126 pref_data->Set(name, insets_value); 127 pref_data->Set(name, insets_value);
127 } 128 }
128 129
129 std::string GetRegisteredDisplayLayoutStr(int64 id1, int64 id2) { 130 std::string GetRegisteredDisplayLayoutStr(int64 id1, int64 id2) {
130 ash::DisplayIdPair pair; 131 ash::DisplayIdPair pair;
131 pair.first = id1; 132 pair.first = id1;
132 pair.second = id2; 133 pair.second = id2;
133 return ash::Shell::GetInstance()->display_controller()-> 134 return ash::Shell::GetInstance()->display_manager()->layout_store()->
134 GetRegisteredDisplayLayout(pair).ToString(); 135 GetRegisteredDisplayLayout(pair).ToString();
135 } 136 }
136 137
137 const PrefService* local_state() const { return &local_state_; } 138 const PrefService* local_state() const { return &local_state_; }
138 139
139 private: 140 private:
140 MockUserManager* mock_user_manager_; // Not owned. 141 MockUserManager* mock_user_manager_; // Not owned.
141 ScopedUserManagerEnabler user_manager_enabler_; 142 ScopedUserManagerEnabler user_manager_enabler_;
142 TestingPrefServiceSimple local_state_; 143 TestingPrefServiceSimple local_state_;
143 scoped_ptr<DisplayConfigurationObserver> observer_; 144 scoped_ptr<DisplayConfigurationObserver> observer_;
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 StoreDisplayPowerStateForTest( 391 StoreDisplayPowerStateForTest(
391 chromeos::DISPLAY_POWER_INTERNAL_OFF_EXTERNAL_ON); 392 chromeos::DISPLAY_POWER_INTERNAL_OFF_EXTERNAL_ON);
392 LoadDisplayPreferences(false); 393 LoadDisplayPreferences(false);
393 EXPECT_EQ( 394 EXPECT_EQ(
394 chromeos::DISPLAY_POWER_INTERNAL_OFF_EXTERNAL_ON, 395 chromeos::DISPLAY_POWER_INTERNAL_OFF_EXTERNAL_ON,
395 ash::Shell::GetInstance()->output_configurator()->power_state()); 396 ash::Shell::GetInstance()->output_configurator()->power_state());
396 } 397 }
397 398
398 } // namespace 399 } // namespace
399 } // namespace chromeos 400 } // namespace chromeos
OLDNEW
« ash/display/display_controller.cc ('K') | « chrome/browser/chromeos/display/display_preferences.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698