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

Unified Diff: ui/gfx/screen_win_unittest.cc

Issue 1813493002: COMPLETED PREVIEW Migrate to Display Placement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gfxmove
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/screen_win.cc ('k') | ui/gfx/win/rect_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « ui/gfx/screen_win.cc ('k') | ui/gfx/win/rect_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698