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 1c93b180a35a0be84dfeca19d28a0a20fb57198e..ed51b2ce1da12aef79446e777b6591119e4eab4f 100644 |
--- a/chrome/browser/chromeos/display/display_preferences_unittest.cc |
+++ b/chrome/browser/chromeos/display/display_preferences_unittest.cc |
@@ -247,7 +247,7 @@ TEST_F(DisplayPreferencesTest, BasicStores) { |
ash::Shell::GetInstance()->display_manager(); |
UpdateDisplay("200x200*2, 400x300#400x400|300x200*1.25"); |
- int64_t id1 = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().id(); |
+ int64_t id1 = gfx::Screen::GetScreen()->GetPrimaryDisplay().id(); |
ash::test::ScopedSetInternalDisplayId set_internal(id1); |
int64_t id2 = ash::ScreenUtil::GetSecondaryDisplay().id(); |
int64_t dummy_id = id2 + 1; |
@@ -520,7 +520,7 @@ TEST_F(DisplayPreferencesTest, PreventStore) { |
TEST_F(DisplayPreferencesTest, StoreForSwappedDisplay) { |
UpdateDisplay("100x100,200x200"); |
- int64_t id1 = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().id(); |
+ int64_t id1 = gfx::Screen::GetScreen()->GetPrimaryDisplay().id(); |
int64_t id2 = ash::ScreenUtil::GetSecondaryDisplay().id(); |
ash::WindowTreeHostManager* window_tree_host_manager = |
@@ -557,7 +557,7 @@ TEST_F(DisplayPreferencesTest, RestoreColorProfiles) { |
ash::DisplayManager* display_manager = |
ash::Shell::GetInstance()->display_manager(); |
- int64_t id1 = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().id(); |
+ int64_t id1 = gfx::Screen::GetScreen()->GetPrimaryDisplay().id(); |
StoreColorProfile(id1, "dynamic"); |
@@ -611,7 +611,7 @@ TEST_F(DisplayPreferencesTest, DontStoreInGuestMode) { |
prefs::kDisplayProperties)->HasUserSetting()); |
// Settings are still notified to the system. |
- gfx::Screen* screen = gfx::Screen::GetNativeScreen(); |
+ gfx::Screen* screen = gfx::Screen::GetScreen(); |
EXPECT_EQ(id2, screen->GetPrimaryDisplay().id()); |
EXPECT_EQ(ash::DisplayLayout::BOTTOM, |
display_manager->GetCurrentDisplayLayout().position); |
@@ -690,7 +690,7 @@ TEST_F(DisplayPreferencesTest, DontSaveAndRestoreAllOff) { |
TEST_F(DisplayPreferencesTest, DontSaveMaximizeModeControllerRotations) { |
ash::Shell* shell = ash::Shell::GetInstance(); |
gfx::Display::SetInternalDisplayId( |
- gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().id()); |
+ gfx::Screen::GetScreen()->GetPrimaryDisplay().id()); |
ash::DisplayManager* display_manager = shell->display_manager(); |
LoggedInAsUser(); |
// Populate the properties. |
@@ -744,7 +744,7 @@ TEST_F(DisplayPreferencesTest, DontSaveMaximizeModeControllerRotations) { |
// Tests that the rotation state is saved without a user being logged in. |
TEST_F(DisplayPreferencesTest, StoreRotationStateNoLogin) { |
gfx::Display::SetInternalDisplayId( |
- gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().id()); |
+ gfx::Screen::GetScreen()->GetPrimaryDisplay().id()); |
EXPECT_FALSE(local_state()->HasPrefPath(prefs::kDisplayRotationLock)); |
bool current_rotation_lock = IsRotationLocked(); |
@@ -766,7 +766,7 @@ TEST_F(DisplayPreferencesTest, StoreRotationStateNoLogin) { |
// Tests that the rotation state is saved when a guest is logged in. |
TEST_F(DisplayPreferencesTest, StoreRotationStateGuest) { |
gfx::Display::SetInternalDisplayId( |
- gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().id()); |
+ gfx::Screen::GetScreen()->GetPrimaryDisplay().id()); |
EXPECT_FALSE(local_state()->HasPrefPath(prefs::kDisplayRotationLock)); |
LoggedInAsGuest(); |
@@ -789,7 +789,7 @@ TEST_F(DisplayPreferencesTest, StoreRotationStateGuest) { |
// Tests that the rotation state is saved when a normal user is logged in. |
TEST_F(DisplayPreferencesTest, StoreRotationStateNormalUser) { |
gfx::Display::SetInternalDisplayId( |
- gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().id()); |
+ gfx::Screen::GetScreen()->GetPrimaryDisplay().id()); |
EXPECT_FALSE(local_state()->HasPrefPath(prefs::kDisplayRotationLock)); |
LoggedInAsGuest(); |
@@ -813,7 +813,7 @@ TEST_F(DisplayPreferencesTest, StoreRotationStateNormalUser) { |
// entering maximize mode applies the state. |
TEST_F(DisplayPreferencesTest, LoadRotationNoLogin) { |
gfx::Display::SetInternalDisplayId( |
- gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().id()); |
+ gfx::Screen::GetScreen()->GetPrimaryDisplay().id()); |
ASSERT_FALSE(local_state()->HasPrefPath(prefs::kDisplayRotationLock)); |
ash::Shell* shell = ash::Shell::GetInstance(); |
@@ -864,7 +864,7 @@ TEST_F(DisplayPreferencesTest, LoadRotationNoLogin) { |
// Tests that rotation lock being set causes the rotation state to be saved. |
TEST_F(DisplayPreferencesTest, RotationLockTriggersStore) { |
gfx::Display::SetInternalDisplayId( |
- gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().id()); |
+ gfx::Screen::GetScreen()->GetPrimaryDisplay().id()); |
ASSERT_FALSE(local_state()->HasPrefPath(prefs::kDisplayRotationLock)); |
ash::Shell::GetInstance()->screen_orientation_controller()->SetRotationLocked( |
@@ -887,9 +887,8 @@ TEST_F(DisplayPreferencesTest, SaveUnifiedMode) { |
UpdateDisplay("200x200,100x100"); |
ash::DisplayIdPair pair = display_manager->GetCurrentDisplayIdPair(); |
- EXPECT_EQ( |
- "400x200", |
- gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().size().ToString()); |
+ EXPECT_EQ("400x200", |
+ gfx::Screen::GetScreen()->GetPrimaryDisplay().size().ToString()); |
const base::DictionaryValue* secondary_displays = |
local_state()->GetDictionary(prefs::kSecondaryDisplays); |
@@ -904,14 +903,13 @@ TEST_F(DisplayPreferencesTest, SaveUnifiedMode) { |
const base::DictionaryValue* displays = |
local_state()->GetDictionary(prefs::kDisplayProperties); |
- int64_t unified_id = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().id(); |
+ int64_t unified_id = gfx::Screen::GetScreen()->GetPrimaryDisplay().id(); |
EXPECT_FALSE( |
displays->GetDictionary(base::Int64ToString(unified_id), &new_value)); |
ash::test::SetDisplayResolution(unified_id, gfx::Size(200, 100)); |
- EXPECT_EQ( |
- "200x100", |
- gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().size().ToString()); |
+ EXPECT_EQ("200x100", |
+ gfx::Screen::GetScreen()->GetPrimaryDisplay().size().ToString()); |
EXPECT_FALSE( |
displays->GetDictionary(base::Int64ToString(unified_id), &new_value)); |
@@ -942,7 +940,7 @@ TEST_F(DisplayPreferencesTest, SaveUnifiedMode) { |
} |
TEST_F(DisplayPreferencesTest, RestoreUnifiedMode) { |
- int64_t id1 = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().id(); |
+ int64_t id1 = gfx::Screen::GetScreen()->GetPrimaryDisplay().id(); |
ash::DisplayIdPair pair = std::make_pair(id1, id1 + 1); |
StoreDisplayBoolPropertyForPair(pair, "default_unified", true); |
StoreDisplayPropertyForPair( |