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

Unified Diff: services/ui/display/platform_screen_ozone_unittests.cc

Issue 2356913002: Pass device scale factor from display to ws. (Closed)
Patch Set: Fix more tests. Created 4 years, 3 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 | « services/ui/display/platform_screen_ozone.cc ('k') | services/ui/display/platform_screen_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/display/platform_screen_ozone_unittests.cc
diff --git a/services/ui/display/platform_screen_ozone_unittests.cc b/services/ui/display/platform_screen_ozone_unittests.cc
index 824294ac280b935492e86300218a5b3a346d392f..a1631d7631f5149d5dc47bd2782003542924f86c 100644
--- a/services/ui/display/platform_screen_ozone_unittests.cc
+++ b/services/ui/display/platform_screen_ozone_unittests.cc
@@ -38,6 +38,8 @@ const int64_t kDefaultDisplayId = 1;
struct DisplayState {
int64_t id;
gfx::Rect bounds;
+ gfx::Size size;
+ float device_scale_factor;
};
// Matchers that operate on DisplayState.
@@ -83,16 +85,22 @@ class TestPlatformScreenDelegate : public PlatformScreenDelegate {
}
private:
- void OnDisplayAdded(int64_t id, const gfx::Rect& bounds) override {
- added_.push_back({id, bounds});
+ void OnDisplayAdded(int64_t id,
+ const gfx::Rect& bounds,
+ const gfx::Size& pixel_size,
+ float device_scale_factor) override {
+ added_.push_back({id, bounds, pixel_size, device_scale_factor});
}
void OnDisplayRemoved(int64_t id) override {
- removed_.push_back({id, gfx::Rect()});
+ removed_.push_back({id, gfx::Rect(), gfx::Size(), 1.0f});
}
- void OnDisplayModified(int64_t id, const gfx::Rect& bounds) override {
- modified_.push_back({id, bounds});
+ void OnDisplayModified(int64_t id,
+ const gfx::Rect& bounds,
+ const gfx::Size& pixel_size,
+ float device_scale_factor) override {
+ modified_.push_back({id, bounds, pixel_size, device_scale_factor});
}
std::vector<DisplayState> added_;
« no previous file with comments | « services/ui/display/platform_screen_ozone.cc ('k') | services/ui/display/platform_screen_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698