| Index: chrome/browser/extensions/api/system_display/display_info_provider_chromeos_unittest.cc
|
| diff --git a/chrome/browser/extensions/api/system_display/display_info_provider_chromeos_unittest.cc b/chrome/browser/extensions/api/system_display/display_info_provider_chromeos_unittest.cc
|
| index 9c0e4113b30fc6de7f1750c08b7717356e1ce0f9..b74ab0f4717e6488c77a619739466dd895774bc0 100644
|
| --- a/chrome/browser/extensions/api/system_display/display_info_provider_chromeos_unittest.cc
|
| +++ b/chrome/browser/extensions/api/system_display/display_info_provider_chromeos_unittest.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/browser/extensions/api/system_display/display_info_provider.h"
|
| +#include "extensions/browser/api/system_display/display_info_provider.h"
|
|
|
| #include "ash/display/display_controller.h"
|
| #include "ash/display/display_manager.h"
|
| @@ -27,7 +27,7 @@ class DisplayInfoProviderChromeosTest : public ash::test::AshTestBase {
|
| protected:
|
| void CallSetDisplayUnitInfo(
|
| const std::string& display_id,
|
| - const api::system_display::DisplayProperties& info,
|
| + const core_api::system_display::DisplayProperties& info,
|
| bool* success,
|
| std::string* error) {
|
| // Reset error messsage.
|
| @@ -50,14 +50,14 @@ class DisplayInfoProviderChromeosTest : public ash::test::AshTestBase {
|
| }
|
|
|
| std::string SystemInfoDisplayInsetsToString(
|
| - const api::system_display::Insets& insets) const {
|
| + const core_api::system_display::Insets& insets) const {
|
| // Order to match gfx::Insets::ToString().
|
| return base::StringPrintf("%d,%d,%d,%d",
|
| insets.top, insets.left, insets.bottom, insets.right);
|
| }
|
|
|
| std::string SystemInfoDisplayBoundsToString(
|
| - const api::system_display::Bounds& bounds) const {
|
| + const core_api::system_display::Bounds& bounds) const {
|
| // Order to match gfx::Rect::ToString().
|
| return base::StringPrintf("%d,%d %dx%d",
|
| bounds.left, bounds.top, bounds.width, bounds.height);
|
| @@ -313,7 +313,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetBoundsOriginLeftExact) {
|
| UpdateDisplay("1200x600,520x400");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(-520));
|
| info.bounds_origin_y.reset(new int(50));
|
|
|
| @@ -332,7 +332,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetBoundsOriginRightExact) {
|
| UpdateDisplay("1200x600,520x400");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(1200));
|
| info.bounds_origin_y.reset(new int(100));
|
|
|
| @@ -351,7 +351,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetBoundsOriginTopExact) {
|
| UpdateDisplay("1200x600,520x400");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(1100));
|
| info.bounds_origin_y.reset(new int(-400));
|
|
|
| @@ -370,7 +370,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetBoundsOriginBottomExact) {
|
| UpdateDisplay("1200x600,520x400");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(-350));
|
| info.bounds_origin_y.reset(new int(600));
|
|
|
| @@ -389,7 +389,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetBoundsOriginSameCenter) {
|
| UpdateDisplay("1200x600,520x400");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(340));
|
| info.bounds_origin_y.reset(new int(100));
|
|
|
| @@ -408,7 +408,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetBoundsOriginLeftOutside) {
|
| UpdateDisplay("1200x600,520x400");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(-1040));
|
| info.bounds_origin_y.reset(new int(100));
|
|
|
| @@ -427,7 +427,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetBoundsOriginTopOutside) {
|
| UpdateDisplay("1200x600,520x400");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(-360));
|
| info.bounds_origin_y.reset(new int(-301));
|
|
|
| @@ -447,7 +447,7 @@ TEST_F(DisplayInfoProviderChromeosTest,
|
| UpdateDisplay("1200x600,1000x100");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(-650));
|
| info.bounds_origin_y.reset(new int(700));
|
|
|
| @@ -467,7 +467,7 @@ TEST_F(DisplayInfoProviderChromeosTest,
|
| UpdateDisplay("1200x600,1000x100");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(850));
|
| info.bounds_origin_y.reset(new int(-150));
|
|
|
| @@ -487,7 +487,7 @@ TEST_F(DisplayInfoProviderChromeosTest,
|
| UpdateDisplay("1200x600,1000x100/l");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(-150));
|
| info.bounds_origin_y.reset(new int(-650));
|
|
|
| @@ -507,7 +507,7 @@ TEST_F(DisplayInfoProviderChromeosTest,
|
| UpdateDisplay("1200x600,1000x100/l");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(1350));
|
| info.bounds_origin_y.reset(new int(450));
|
|
|
| @@ -526,7 +526,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetBoundsOriginPrimaryHiDPI) {
|
| UpdateDisplay("1200x600*2,500x500");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(250));
|
| info.bounds_origin_y.reset(new int(-100));
|
|
|
| @@ -545,7 +545,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetBoundsOriginSecondaryHiDPI) {
|
| UpdateDisplay("1200x600,600x1000*2");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(450));
|
| info.bounds_origin_y.reset(new int(-100));
|
|
|
| @@ -564,7 +564,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetBoundsOriginOutOfBounds) {
|
| UpdateDisplay("1200x600,600x1000*2");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(0x200001));
|
| info.bounds_origin_y.reset(new int(-100));
|
|
|
| @@ -583,7 +583,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetBoundsOriginOutOfBoundsNegative) {
|
| UpdateDisplay("1200x600,600x1000*2");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(300));
|
| info.bounds_origin_y.reset(new int(-0x200001));
|
|
|
| @@ -602,7 +602,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetBoundsOriginMaxValues) {
|
| UpdateDisplay("1200x4600,600x1000*2");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(200000));
|
| info.bounds_origin_y.reset(new int(10));
|
|
|
| @@ -621,7 +621,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetBoundsOriginOnPrimary) {
|
| UpdateDisplay("1200x600,600x1000*2");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(300));
|
| info.is_primary.reset(new bool(true));
|
|
|
| @@ -645,7 +645,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetBoundsOriginWithMirroring) {
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| const gfx::Display& primary = ash::Shell::GetScreen()->GetPrimaryDisplay();
|
|
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.bounds_origin_x.reset(new int(300));
|
| info.mirroring_source_id.reset(
|
| new std::string(base::Int64ToString(primary.id())));
|
| @@ -664,7 +664,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetRotation) {
|
| UpdateDisplay("1200x600,600x1000*2");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.rotation.reset(new int(90));
|
|
|
| bool success = false;
|
| @@ -717,7 +717,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetInvalidRotation) {
|
| UpdateDisplay("1200x600,600x1000*2");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| + core_api::system_display::DisplayProperties info;
|
| info.rotation.reset(new int(91));
|
|
|
| bool success = false;
|
| @@ -733,8 +733,8 @@ TEST_F(DisplayInfoProviderChromeosTest, SetNegativeOverscan) {
|
| UpdateDisplay("1200x600,600x1000*2");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| - info.overscan.reset(new api::system_display::Insets);
|
| + core_api::system_display::DisplayProperties info;
|
| + info.overscan.reset(new core_api::system_display::Insets);
|
| info.overscan->left= -10;
|
|
|
| bool success = false;
|
| @@ -796,8 +796,8 @@ TEST_F(DisplayInfoProviderChromeosTest, SetOverscanLargerThanHorizontalBounds) {
|
| UpdateDisplay("1200x600,600x1000*2");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| - info.overscan.reset(new api::system_display::Insets);
|
| + core_api::system_display::DisplayProperties info;
|
| + info.overscan.reset(new core_api::system_display::Insets);
|
| // Horizontal overscan is 151, which would make the bounds width 149.
|
| info.overscan->left= 50;
|
| info.overscan->top = 10;
|
| @@ -818,8 +818,8 @@ TEST_F(DisplayInfoProviderChromeosTest, SetOverscanLargerThanVerticalBounds) {
|
| UpdateDisplay("1200x600,600x1000");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| - info.overscan.reset(new api::system_display::Insets);
|
| + core_api::system_display::DisplayProperties info;
|
| + info.overscan.reset(new core_api::system_display::Insets);
|
| // Vertical overscan is 501, which would make the bounds height 499.
|
| info.overscan->left= 20;
|
| info.overscan->top = 250;
|
| @@ -840,8 +840,8 @@ TEST_F(DisplayInfoProviderChromeosTest, SetOverscan) {
|
| UpdateDisplay("1200x600,600x1000*2");
|
|
|
| const gfx::Display& secondary = ash::ScreenUtil::GetSecondaryDisplay();
|
| - api::system_display::DisplayProperties info;
|
| - info.overscan.reset(new api::system_display::Insets);
|
| + core_api::system_display::DisplayProperties info;
|
| + info.overscan.reset(new core_api::system_display::Insets);
|
| info.overscan->left= 20;
|
| info.overscan->top = 199;
|
| info.overscan->right = 130;
|
| @@ -871,8 +871,8 @@ TEST_F(DisplayInfoProviderChromeosTest, SetOverscanForInternal) {
|
| ash::test::DisplayManagerTestApi(GetDisplayManager()).
|
| SetFirstDisplayAsInternalDisplay();
|
|
|
| - api::system_display::DisplayProperties info;
|
| - info.overscan.reset(new api::system_display::Insets);
|
| + core_api::system_display::DisplayProperties info;
|
| + info.overscan.reset(new core_api::system_display::Insets);
|
| // Vertical overscan is 501, which would make the bounds height 499.
|
| info.overscan->left= 20;
|
| info.overscan->top = 20;
|
|
|