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

Side by Side Diff: ash/display/display_manager_unittest.cc

Issue 922843002: Fix software mirror mode on Ozone part 2/2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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 "ash/display/display_manager.h" 5 #include "ash/display/display_manager.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/display/display_controller.h" 8 #include "ash/display/display_controller.h"
9 #include "ash/display/display_info.h" 9 #include "ash/display/display_info.h"
10 #include "ash/display/display_layout_store.h" 10 #include "ash/display/display_layout_store.h"
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 585
586 // mirrored... 586 // mirrored...
587 display_info_list.clear(); 587 display_info_list.clear();
588 display_info_list.push_back(internal_display_info); 588 display_info_list.push_back(internal_display_info);
589 display_info_list.push_back(mirrored_display_info); 589 display_info_list.push_back(mirrored_display_info);
590 display_manager()->OnNativeDisplaysChanged(display_info_list); 590 display_manager()->OnNativeDisplaysChanged(display_info_list);
591 EXPECT_EQ(1U, display_manager()->GetNumDisplays()); 591 EXPECT_EQ(1U, display_manager()->GetNumDisplays());
592 EXPECT_EQ("0,0 500x500", 592 EXPECT_EQ("0,0 500x500",
593 GetDisplayForId(internal_display_id).bounds().ToString()); 593 GetDisplayForId(internal_display_id).bounds().ToString());
594 EXPECT_EQ(2U, display_manager()->num_connected_displays()); 594 EXPECT_EQ(2U, display_manager()->num_connected_displays());
595 EXPECT_EQ(11U, display_manager()->mirrored_display_id()); 595 EXPECT_EQ(11U, display_manager()->mirroring_display_id());
596 EXPECT_TRUE(display_manager()->IsMirrored()); 596 EXPECT_TRUE(display_manager()->IsMirrored());
597 597
598 // Test display name. 598 // Test display name.
599 EXPECT_EQ(ToDisplayName(internal_display_id), 599 EXPECT_EQ(ToDisplayName(internal_display_id),
600 display_manager()->GetDisplayNameForId(internal_display_id)); 600 display_manager()->GetDisplayNameForId(internal_display_id));
601 EXPECT_EQ("x-10", display_manager()->GetDisplayNameForId(10)); 601 EXPECT_EQ("x-10", display_manager()->GetDisplayNameForId(10));
602 EXPECT_EQ("x-11", display_manager()->GetDisplayNameForId(11)); 602 EXPECT_EQ("x-11", display_manager()->GetDisplayNameForId(11));
603 EXPECT_EQ("x-12", display_manager()->GetDisplayNameForId(12)); 603 EXPECT_EQ("x-12", display_manager()->GetDisplayNameForId(12));
604 // Default name for the id that doesn't exist. 604 // Default name for the id that doesn't exist.
605 EXPECT_EQ("Display 100", display_manager()->GetDisplayNameForId(100)); 605 EXPECT_EQ("Display 100", display_manager()->GetDisplayNameForId(100));
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 1.25f, Shell::GetScreen()->GetPrimaryDisplay().device_scale_factor()); 1674 1.25f, Shell::GetScreen()->GetPrimaryDisplay().device_scale_factor());
1675 EXPECT_TRUE(IsTextSubpixelPositioningEnabled()); 1675 EXPECT_TRUE(IsTextSubpixelPositioningEnabled());
1676 EXPECT_EQ(gfx::FontRenderParams::HINTING_NONE, GetFontHintingParams()); 1676 EXPECT_EQ(gfx::FontRenderParams::HINTING_NONE, GetFontHintingParams());
1677 1677
1678 DisplayInfo::SetUse125DSFForUIScaling(false); 1678 DisplayInfo::SetUse125DSFForUIScaling(false);
1679 } 1679 }
1680 1680
1681 #endif // OS_CHROMEOS 1681 #endif // OS_CHROMEOS
1682 1682
1683 } // namespace ash 1683 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698