diff --git a/internal/driver/chrome/driver_test.go b/internal/driver/chrome/driver_test.go index f54d5a4..8863e43 100644 --- a/internal/driver/chrome/driver_test.go +++ b/internal/driver/chrome/driver_test.go @@ -1233,3 +1233,19 @@ func TestMetrics_AFailedRoundTripIsNotAPageWithoutTheAPI(t *testing.T) { "the run cannot tell that from a page with no performance.memory", metrics) } } + +// CDP exposes no per-page CPU, so every web step used to record a zero the +// sampler never took, which is the same answer an idle app gives. +func TestMetrics_ReportsNoCPUSampleRatherThanZero(t *testing.T) { + server := servePage(t, `