| Index: ui/gfx/screen_win_unittest.cc
|
| diff --git a/ui/gfx/screen_win_unittest.cc b/ui/gfx/screen_win_unittest.cc
|
| index 5abbf8dad7e4359bd51b7c62039c7876067908a3..ad34e528528dbbc7f43092dc98dba36f0835b592 100644
|
| --- a/ui/gfx/screen_win_unittest.cc
|
| +++ b/ui/gfx/screen_win_unittest.cc
|
| @@ -22,6 +22,7 @@
|
| #include "ui/gfx/screen.h"
|
| #include "ui/gfx/switches.h"
|
| #include "ui/gfx/test/display_util.h"
|
| +#include "ui/gfx/test/screen_util_win.h"
|
| #include "ui/gfx/win/display_info.h"
|
| #include "ui/gfx/win/dpi.h"
|
| #include "ui/gfx/win/screen_win_display.h"
|
| @@ -30,20 +31,6 @@ namespace gfx {
|
|
|
| namespace {
|
|
|
| -MONITORINFOEX CreateMonitorInfo(gfx::Rect monitor,
|
| - gfx::Rect work,
|
| - std::wstring device_name) {
|
| - MONITORINFOEX monitor_info;
|
| - ::ZeroMemory(&monitor_info, sizeof(monitor_info));
|
| - monitor_info.cbSize = sizeof(monitor_info);
|
| - monitor_info.rcMonitor = monitor.ToRECT();
|
| - monitor_info.rcWork = work.ToRECT();
|
| - size_t device_char_count = ARRAYSIZE(monitor_info.szDevice);
|
| - wcsncpy(monitor_info.szDevice, device_name.c_str(), device_char_count);
|
| - monitor_info.szDevice[device_char_count-1] = L'\0';
|
| - return monitor_info;
|
| -}
|
| -
|
| class TestScreenWin : public gfx::ScreenWin {
|
| public:
|
| TestScreenWin(const std::vector<gfx::win::DisplayInfo>& display_infos,
|
| @@ -158,9 +145,9 @@ class TestScreenWinManager : public TestScreenWinInitializer {
|
| const gfx::Rect& pixel_work,
|
| const wchar_t* device_name,
|
| float device_scale_factor) override {
|
| - MONITORINFOEX monitor_info = CreateMonitorInfo(pixel_bounds,
|
| - pixel_work,
|
| - device_name);
|
| + MONITORINFOEX monitor_info = gfx::test::CreateMonitorInfo(pixel_bounds,
|
| + pixel_work,
|
| + device_name);
|
| monitor_infos_.push_back(monitor_info);
|
| display_infos_.push_back(gfx::win::DisplayInfo(monitor_info,
|
| device_scale_factor,
|
|
|