[bluetooth] Decouple TestPairingDelegate from RunLoop.

Convert TestPairingDelegate into a pure gMock implementation
(MockPairingDelegate) which makes no calls to base::RunLoop.
This is necessary because the current implementation assumes that the
BluetoothDevice calls made (e.g. SetPinCode(), CancelPairing(), etc.)
are synchronous, but there is no guarantee that they are. Removing the
message loop from this implementation allows tests to do their
own waiting (e.g. with a local RunLoop) for test completion.

Bug: none
Change-Id: I0487890c2c972706865fb584a855976e39043faa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3068380
Commit-Queue: Chris Mumford <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Cr-Commit-Position: refs/heads/master@{#909111}
diff --git a/device/BUILD.gn b/device/BUILD.gn
index 0482baf..df876b5 100644
--- a/device/BUILD.gn
+++ b/device/BUILD.gn
@@ -42,14 +42,14 @@
     "bluetooth/test/bluetooth_gatt_server_test.h",
     "bluetooth/test/bluetooth_test.cc",
     "bluetooth/test/bluetooth_test.h",
+    "bluetooth/test/mock_pairing_delegate.cc",
+    "bluetooth/test/mock_pairing_delegate.h",
     "bluetooth/test/test_bluetooth_adapter_observer.cc",
     "bluetooth/test/test_bluetooth_adapter_observer.h",
     "bluetooth/test/test_bluetooth_advertisement_observer.cc",
     "bluetooth/test/test_bluetooth_advertisement_observer.h",
     "bluetooth/test/test_bluetooth_local_gatt_service_delegate.cc",
     "bluetooth/test/test_bluetooth_local_gatt_service_delegate.h",
-    "bluetooth/test/test_pairing_delegate.cc",
-    "bluetooth/test/test_pairing_delegate.h",
     "gamepad/abstract_haptic_gamepad_unittest.cc",
     "gamepad/dualshock4_controller_unittest.cc",
     "gamepad/gamepad_blocklist_unittest.cc",