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

Unified Diff: ash/wm/ash_native_cursor_manager_unittest.cc

Issue 2426103004: Specify a default display UI scale to reset the zoom to (Closed)
Patch Set: Working test Created 4 years, 2 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
Index: ash/wm/ash_native_cursor_manager_unittest.cc
diff --git a/ash/wm/ash_native_cursor_manager_unittest.cc b/ash/wm/ash_native_cursor_manager_unittest.cc
index 0acd6e18fb3b3ce6b29e24a8113737f0e65d862b..2d73b89c39110569917984349cf33873a9918bb3 100644
--- a/ash/wm/ash_native_cursor_manager_unittest.cc
+++ b/ash/wm/ash_native_cursor_manager_unittest.cc
@@ -9,6 +9,7 @@
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/test/cursor_manager_test_api.h"
+#include "ash/test/display_manager_test_api.h"
#include "ui/aura/test/aura_test_utils.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/test_windows.h"
@@ -183,13 +184,15 @@ TEST_F(AshNativeCursorManagerTest, MAYBE_UIScaleShouldNotChangeCursor) {
::wm::CursorManager* cursor_manager = Shell::GetInstance()->cursor_manager();
CursorManagerTestApi test_api(cursor_manager);
- Shell::GetInstance()->display_manager()->SetDisplayUIScale(display_id, 0.5f);
+ test::DisplayManagerTestApi(Shell::GetInstance()->display_manager())
+ .SetDisplayUIScale(display_id, 0.5f);
EXPECT_EQ(
1.0f,
display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor());
EXPECT_EQ(1.0f, test_api.GetCurrentCursor().device_scale_factor());
- Shell::GetInstance()->display_manager()->SetDisplayUIScale(display_id, 1.0f);
+ test::DisplayManagerTestApi(Shell::GetInstance()->display_manager())
+ .SetDisplayUIScale(display_id, 1.0f);
// 2x display should keep using 2x cursor regardless of the UI scale.
UpdateDisplay("800x800*2");
@@ -197,7 +200,8 @@ TEST_F(AshNativeCursorManagerTest, MAYBE_UIScaleShouldNotChangeCursor) {
2.0f,
display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor());
EXPECT_EQ(2.0f, test_api.GetCurrentCursor().device_scale_factor());
- Shell::GetInstance()->display_manager()->SetDisplayUIScale(display_id, 2.0f);
+ test::DisplayManagerTestApi(Shell::GetInstance()->display_manager())
+ .SetDisplayUIScale(display_id, 2.0f);
EXPECT_EQ(
1.0f,
display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor());
« no previous file with comments | « ash/test/display_manager_test_api.cc ('k') | chrome/browser/chromeos/display/display_preferences_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698