[idle] Add a test to assert we stop polling when the renderer disconnects.

Polling for the idle status is resource intensive so we want to make sure
it stops when script isn't listening to idle events, which happens
whenever the monitor pipe disconnects (e.g. when the JS binding goes
out of scope).

Bug: 878979
Change-Id: I50f5f398b671dc68a6a400cb46025343afd39231
Reviewed-on: https://chromium-review.googlesource.com/c/1441313
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Sam Goto <goto@chromium.org>
Auto-Submit: Sam Goto <goto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#627089}
1 file changed