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

Unified Diff: chrome/browser/manifest/manifest_icon_selector_unittest.cc

Issue 2431473002: Change single-display screens to use ScreenBase and DisplayList. (Closed)
Patch Set: renderer test Created 4 years, 1 month 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 | « blimp/engine/app/ui/blimp_screen_unittest.cc ('k') | chromecast/graphics/cast_screen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/manifest/manifest_icon_selector_unittest.cc
diff --git a/chrome/browser/manifest/manifest_icon_selector_unittest.cc b/chrome/browser/manifest/manifest_icon_selector_unittest.cc
index 7cf0e5cfdc2fd6ff6ca953fedfc9bb79b404fdfa..2d8499e0985334ceae49600d1f62404e36250c75 100644
--- a/chrome/browser/manifest/manifest_icon_selector_unittest.cc
+++ b/chrome/browser/manifest/manifest_icon_selector_unittest.cc
@@ -20,8 +20,13 @@ const int DEFAULT_PREFERRED_ICON_SIZE = 48;
class ManifestIconSelectorTest : public testing::Test {
protected:
ManifestIconSelectorTest() {
- test_screen_.display()->set_id(0x1337);
- test_screen_.display()->set_bounds(gfx::Rect(0, 0, 2560, 1440));
+ const display::Display test_display = test_screen_.GetPrimaryDisplay();
+ display::Display display(test_display);
+ display.set_id(0x1337);
+ display.set_bounds(gfx::Rect(0, 0, 2560, 1440));
+ test_screen_.display_list().RemoveDisplay(test_display.id());
+ test_screen_.display_list().AddDisplay(display,
+ display::DisplayList::Type::PRIMARY);
display::Screen::SetScreenInstance(&test_screen_);
}
@@ -45,7 +50,9 @@ class ManifestIconSelectorTest : public testing::Test {
}
void SetDisplayDeviceScaleFactor(float device_scale_factor) {
- test_screen_.display()->set_device_scale_factor(device_scale_factor);
+ display::Display display(test_screen_.GetPrimaryDisplay());
+ display.set_device_scale_factor(device_scale_factor);
+ test_screen_.display_list().UpdateDisplay(display);
}
int GetPreferredIconSizeInDp() {
« no previous file with comments | « blimp/engine/app/ui/blimp_screen_unittest.cc ('k') | chromecast/graphics/cast_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698