powerd's daemon.cc file is more than a thousand lines long now but doesn't have any unit tests. Most of what it does is straightforward but it's still scary to touch it.
I should pull the "real" things that it does (including the creation of many member objects) into a DaemonDelegate interface, with a real implementation passed by main.cc and a no-op implementation that returns stubs (most of which already exist) passed by tests.
This might touch on issue 558902 .
Comment 1 by bugdroid1@chromium.org
, Jul 21 2016