Clean up WindowSizer, especially for Chrome OS and for tests |
||
Issue description* The code is a tangled mess split between window_sizer.cc, window_sizer_ash.cc, window_sizer_common_unittest.cc, window_sizer_ash_unittest.cc, etc. * WindowSizer has ifdef'd member functions that are implemented in other files. * Tests sometimes inject a Screen and sometimes don't, which adds complexity around target display lookup * Platform-specific code lives in //c/b/ui The core problem is that there is no platform-specific factory for these objects. If we had one we could subclass it for Chrome OS (and for Mac) and keep the impls in the platform directories.
,
May 29 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d705a122ffcd22527bca5003d5c685ed52398ead commit d705a122ffcd22527bca5003d5c685ed52398ead Author: James Cook <jamescook@chromium.org> Date: Tue May 29 17:59:43 2018 Clean up WindowSizer test code for ash * Move ash-specific test helper functions into the ash unittest file * Make all ash tests use the test harness display via UpdateDisplays() rather than adding an additional TestScreen * Moved shared TestingProfile setup into test base class * Remove unused enum Edge Bug: 846736 Test: unit_tests Change-Id: I062e6ec1632db5a99339c8d662d5343c963fd3f1 Reviewed-on: https://chromium-review.googlesource.com/1075723 Commit-Queue: James Cook <jamescook@chromium.org> Reviewed-by: Michael Wasserman <msw@chromium.org> Cr-Commit-Position: refs/heads/master@{#562501} [modify] https://crrev.com/d705a122ffcd22527bca5003d5c685ed52398ead/chrome/browser/ui/window_sizer/window_sizer.h [modify] https://crrev.com/d705a122ffcd22527bca5003d5c685ed52398ead/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc [modify] https://crrev.com/d705a122ffcd22527bca5003d5c685ed52398ead/chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc [modify] https://crrev.com/d705a122ffcd22527bca5003d5c685ed52398ead/chrome/browser/ui/window_sizer/window_sizer_common_unittest.h
,
Jun 1 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, May 25 2018