Issue 803727 tracked a regression where Chrome's screen-locking code would fail to acknowledge when the lock screen was up, resulting in powerd waiting 20 seconds for Chrome to confirm suspend readiness before timing out and suspending.
We should have some way to catch bugs like this. Unfortunately, it seems pretty tricky: different challenging-to-instrument parts of Chrome can delay suspend (screen lock, ARC, etc.), and powerd still suspends eventually even if Chrome fails to respond. Other clients like shill also register suspend delays, so we'd probably want to exercise them as well.
I'll think about this some more, but I'm all ears for suggestions too.
Comment 1 by tbroch@chromium.org
, Jan 23 2018