| Index: ui/gfx/display_unittest.cc
|
| diff --git a/ui/gfx/display_unittest.cc b/ui/gfx/display_unittest.cc
|
| index 39a5fb679d67436ef0aedfa77bc2b16fe35790ab..3fa8042751234c30b9d41d29e8a3d3638026eba0 100644
|
| --- a/ui/gfx/display_unittest.cc
|
| +++ b/ui/gfx/display_unittest.cc
|
| @@ -46,4 +46,19 @@ TEST(DisplayTest, Scale) {
|
| EXPECT_EQ("10,10 80x80", display.work_area().ToString());
|
| }
|
|
|
| +TEST(DisplayTest, OverscanInsets) {
|
| + gfx::Display display(0, gfx::Rect(0, 0, 100, 100));
|
| + display.SetOverscanInsets(gfx::Insets(3, 4, 5, 6));
|
| + EXPECT_EQ("4,3 90x92", display.bounds_in_pixel().ToString());
|
| + display.SetOverscanInsets(gfx::Insets(6, 5, 4, 3));
|
| + EXPECT_EQ("5,6 92x90", display.bounds_in_pixel().ToString());
|
| +
|
| + gfx::Display hidpi_display(0, gfx::Rect(0, 0, 100, 100));
|
| + hidpi_display.set_device_scale_factor(2.0f);
|
| + hidpi_display.SetOverscanInsets(gfx::Insets(3, 4, 5, 6));
|
| + EXPECT_EQ("8,6 80x84", hidpi_display.bounds_in_pixel().ToString());
|
| + hidpi_display.SetOverscanInsets(gfx::Insets(6, 5, 4, 3));
|
| + EXPECT_EQ("10,12 84x80", hidpi_display.bounds_in_pixel().ToString());
|
| +}
|
| +
|
| }
|
|
|