Index: chrome/browser/extensions/display_info_provider_chromeos_unittest.cc |
diff --git a/chrome/browser/extensions/display_info_provider_chromeos_unittest.cc b/chrome/browser/extensions/display_info_provider_chromeos_unittest.cc |
index c9858df35e5dfdec8edc94aeeb6b6bece748ad64..28edfecc09f82fd01b569863e32118ecb954c07c 100644 |
--- a/chrome/browser/extensions/display_info_provider_chromeos_unittest.cc |
+++ b/chrome/browser/extensions/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" |
@@ -12,7 +12,7 @@ |
#include "ash/test/display_manager_test_api.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/strings/stringprintf.h" |
-#include "chrome/common/extensions/api/system_display.h" |
+#include "extensions/common/api/system_display.h" |
#include "ui/gfx/display.h" |
#include "ui/gfx/rect.h" |
@@ -28,7 +28,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. |
@@ -51,14 +51,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); |
@@ -315,7 +315,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)); |
@@ -334,7 +334,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)); |
@@ -353,7 +353,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)); |
@@ -372,7 +372,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)); |
@@ -391,7 +391,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)); |
@@ -410,7 +410,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)); |
@@ -429,7 +429,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)); |
@@ -449,7 +449,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)); |
@@ -468,7 +468,7 @@ TEST_F(DisplayInfoProviderChromeosTest, SetBoundsOriginRightButSharesTopSide) { |
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, SetBoundsOriginTopButSharesLeftSide) { |
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; |
@@ -839,8 +839,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; |
@@ -870,8 +870,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; |