| 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 b2eb4c6f311f3c2f76759ec4b400c890713f4d7b..3557ceb3362cf628dcbb39e201645dcfaab90411 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 =
|
| @@ -558,7 +558,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");
|
|
|
| @@ -612,7 +612,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);
|
| @@ -691,7 +691,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.
|
| @@ -745,7 +745,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();
|
| @@ -767,7 +767,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();
|
|
|
| @@ -790,7 +790,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();
|
|
|
| @@ -814,7 +814,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();
|
| @@ -865,7 +865,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(
|
| @@ -888,9 +888,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);
|
| @@ -905,14 +904,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(
|
|
|