Dark Mode / WebUI: make TestWebUI auto-register message handlers

This makes test code easier to write and understand and is also what the
"prod" WebUI class already does.

This is loosely related to Dark Mode support, as I discovered this
difference in behavior while working on unit tests for this work.

WIP Dark Mode CL: https://crrev.com/c/1354685

R=jam@chromium.org
BUG=883049

Change-Id: I6862e2cd0244bdb02bd6dd92870bc2ec70d2099a
Reviewed-on: https://chromium-review.googlesource.com/c/1359132
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Dan Beam <dbeam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613332}
2 files changed