Create GPU watchdog V2 unit tests

A new file gpu_watchdog_thread_unittest.cc is added.

The test first creates a new watchdog thread and then uses MessageLoop
and RunLoop to run the gpu tasks. The watchdog thread will be notified
at the beginning and end of every task. The SimpleTask used for the
test only does one thing - Sleep().

The current watchdog timeout for testing is set to 1 second. If it
causes flakiness. The timeout for the test should increase to avoid
flakiness

Bug: 949838
Change-Id: Iaf9047cb790ad8039903702637082ce6bebc5e89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1690414
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#675935}
2 files changed