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 43c0b8be7735a33504da09b39df0b92d3b472d31..4152cc842ee228b96bafc0f9b8f78e6db7fdf698 100644 |
--- a/chrome/browser/chromeos/display/display_preferences_unittest.cc |
+++ b/chrome/browser/chromeos/display/display_preferences_unittest.cc |
@@ -113,15 +113,15 @@ class DisplayPreferencesTest : public ash::test::AshTestBase { |
} |
void StoreDisplayOverscan(int64 id, const gfx::Insets& insets) { |
- DictionaryPrefUpdate update(&local_state_, prefs::kDisplayOverscans); |
+ DictionaryPrefUpdate update(&local_state_, prefs::kDisplayProperties); |
const std::string name = base::Int64ToString(id); |
base::DictionaryValue* pref_data = update.Get(); |
base::DictionaryValue* insets_value = new base::DictionaryValue(); |
- insets_value->SetInteger("top", insets.top()); |
- insets_value->SetInteger("left", insets.left()); |
- insets_value->SetInteger("bottom", insets.bottom()); |
- insets_value->SetInteger("right", insets.right()); |
+ insets_value->SetInteger("insets_top", insets.top()); |
+ insets_value->SetInteger("insets_left", insets.left()); |
+ insets_value->SetInteger("insets_bottom", insets.bottom()); |
+ insets_value->SetInteger("insets_right", insets.right()); |
pref_data->Set(name, insets_value); |
} |
@@ -157,7 +157,7 @@ TEST_F(DisplayPreferencesTest, OldInitialization) { |
StoreDisplayOverscan(id1, gfx::Insets(10, 10, 10, 10)); |
StoreDisplayOverscan(id2, gfx::Insets(20, 20, 20, 20)); |
- NotifyDisplayLocalStatePrefChanged(); |
+ LoadDisplayPreferences(); |
// Check if the layout settings are notified to the system properly. |
ash::DisplayController* display_controller = |
ash::Shell::GetInstance()->display_controller(); |
@@ -187,7 +187,7 @@ TEST_F(DisplayPreferencesTest, PairedLayoutOverrides) { |
StoreDisplayLayoutPrefForPair(id1, dummy_id, ash::DisplayLayout::LEFT, 30); |
StoreDefaultLayoutPref(ash::DisplayLayout::LEFT, 50); |
- NotifyDisplayLocalStatePrefChanged(); |
+ LoadDisplayPreferences(); |
// Check if the layout settings are notified to the system properly. |
// The paired layout overrides old layout. |
ash::DisplayController* display_controller = |
@@ -216,8 +216,8 @@ TEST_F(DisplayPreferencesTest, BasicStores) { |
GetDisplayController()->SetPrimaryDisplayId(dummy_id); |
EXPECT_NE(dummy_id, local_state()->GetInt64(prefs::kPrimaryDisplayID)); |
- SetAndStoreDisplayOverscan( |
- ash::ScreenAsh::GetNativeScreen()->GetPrimaryDisplay(), |
+ ash::Shell::GetInstance()->display_controller()->SetOverscanInsets( |
+ ash::ScreenAsh::GetNativeScreen()->GetPrimaryDisplay().id(), |
gfx::Insets(10, 11, 12, 13)); |
scoped_ptr<base::DictionaryValue> serialized_value( |
@@ -239,14 +239,14 @@ TEST_F(DisplayPreferencesTest, BasicStores) { |
EXPECT_EQ(10, local_state()->GetInteger(prefs::kSecondaryDisplayOffset)); |
const base::DictionaryValue* overscans = |
- local_state()->GetDictionary(prefs::kDisplayOverscans); |
+ local_state()->GetDictionary(prefs::kDisplayProperties); |
const base::DictionaryValue* overscan = NULL; |
EXPECT_TRUE(overscans->GetDictionary(base::Int64ToString(id1), &overscan)); |
int top = 0, left = 0, bottom = 0, right = 0; |
- EXPECT_TRUE(overscan->GetInteger("top", &top)); |
- EXPECT_TRUE(overscan->GetInteger("left", &left)); |
- EXPECT_TRUE(overscan->GetInteger("bottom", &bottom)); |
- EXPECT_TRUE(overscan->GetInteger("right", &right)); |
+ EXPECT_TRUE(overscan->GetInteger("insets_top", &top)); |
+ EXPECT_TRUE(overscan->GetInteger("insets_left", &left)); |
+ EXPECT_TRUE(overscan->GetInteger("insets_bottom", &bottom)); |
+ EXPECT_TRUE(overscan->GetInteger("insets_right", &right)); |
EXPECT_EQ(10, top); |
EXPECT_EQ(11, left); |
EXPECT_EQ(12, bottom); |
@@ -309,8 +309,8 @@ TEST_F(DisplayPreferencesTest, DontStoreInGuestMode) { |
ash::DisplayLayout layout(ash::DisplayLayout::TOP, 10); |
SetCurrentAndDefaultDisplayLayout(layout); |
GetDisplayController()->SetPrimaryDisplayId(id2); |
- SetAndStoreDisplayOverscan( |
- ash::ScreenAsh::GetNativeScreen()->GetPrimaryDisplay(), |
+ ash::Shell::GetInstance()->display_controller()->SetOverscanInsets( |
+ ash::ScreenAsh::GetNativeScreen()->GetPrimaryDisplay().id(), |
gfx::Insets(10, 11, 12, 13)); |
// Does not store the preferences locally. |
@@ -323,7 +323,7 @@ TEST_F(DisplayPreferencesTest, DontStoreInGuestMode) { |
EXPECT_FALSE(local_state()->FindPreference( |
prefs::kPrimaryDisplayID)->HasUserSetting()); |
EXPECT_FALSE(local_state()->FindPreference( |
- prefs::kDisplayOverscans)->HasUserSetting()); |
+ prefs::kDisplayProperties)->HasUserSetting()); |
// Settings are still notified to the system. |
ash::DisplayController* display_controller = |