Revert "bluetooth: Use DeviceUUID in FakeBluetooth"

This reverts commit af1c15b16f99d290799c83d34c111bce52447026.

Reason for revert: suspected for persistent failures on Win7 Tests (dbg)(1)

Unexpected Failures:
* external/wpt/bluetooth/server/getPrimaryServices/blocklisted-services.https.html
* external/wpt/bluetooth/service/getCharacteristic/gen-blocklisted-characteristic.https.html
* external/wpt/bluetooth/service/getCharacteristics/blocklisted-characteristics.https.html
* external/wpt/bluetooth/service/getCharacteristics/gen-blocklisted-characteristic-with-uuid.https.html
* external/wpt/upgrade-insecure-requests/link-upgrade.sub.https.html

since

https://ci.chromium.org/buildbot/chromium.win/Win7%20Tests%20%28dbg%29%281%29/66761

errors like

15:59:42.310 5904 worker/4 external/wpt/bluetooth/service/getCharacteristics/gen-blocklisted-characteristic-with-uuid.https.html crashed, (stderr lines):
15:59:42.311 5904   CONSOLE MESSAGE: line 255: Web Bluetooth is experimental on this platform. See https://github.com/WebBluetoothCG/web-bluetooth/blob/gh-pages/implementation-status.md
15:59:42.327 1300 [1691/5755] external/wpt/bluetooth/service/getCharacteristics/gen-blocklisted-characteristic-with-uuid.https.html failed unexpectedly (content_shell crashed [pid=5644])

Original change's description:
> bluetooth: Use DeviceUUID in FakeBluetooth
>
> This change refactors the Web Bluetooth test API to use the
> DeviceUUIDs helper class defined in BluetoothDevice. Additionally,
> this change finishes the implementation of SimulateGATTServicesChanged,
> and as a result, tests are updated to set the next discovery response
> before calling this interface.
>
> BUG=719826
>
> Change-Id: I0f986eb7afe6fbf7ebaa80ac4b633d46a027b80d
> Reviewed-on: https://chromium-review.googlesource.com/939984
> Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
> Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#541577}

TBR=cco3@chromium.org,ortuno@chromium.org,odejesush@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 719826
Change-Id: I02bb7066c6f1282191f7a24e91b3d2c5614b8104
Reviewed-on: https://chromium-review.googlesource.com/958741
Reviewed-by: Trent Apted <tapted@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542421}
diff --git a/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.html b/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.html
index c4c80d2..02aaecc 100644
--- a/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.html
+++ b/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.html
@@ -17,7 +17,6 @@
     .then(() => characteristic.getDescriptor(user_description.name))
     .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e))
     .then(() => fake_characteristic.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
       characteristic.getDescriptor(user_description.name), expected)),
diff --git a/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.html b/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.html
index 0f1b514..bfb4c8d 100644
--- a/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.html
+++ b/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.html
@@ -17,7 +17,6 @@
 bluetooth_test(() => getMeasurementIntervalCharacteristic()
     .then(_ => ({characteristic, fake_peripheral, fake_service} = _))
     .then(() => fake_service.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
         characteristic.getDescriptor(user_description.name),
diff --git a/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.html b/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.html
index 1f675c8..c00d4cf 100644
--- a/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.html
+++ b/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.html
@@ -17,7 +17,6 @@
     .then(() => characteristic.getDescriptor(user_description.name))
     .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e))
     .then(() => fake_characteristic.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
       characteristic.getDescriptors(user_description.name), expected)),
diff --git a/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.html b/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.html
index 835036f..a29548f 100644
--- a/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.html
+++ b/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.html
@@ -17,7 +17,6 @@
     .then(() => characteristic.getDescriptor(user_description.name))
     .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e))
     .then(() => fake_characteristic.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
       characteristic.getDescriptors(), expected)),
diff --git a/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.html b/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.html
index 6e69704..de83400 100644
--- a/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.html
+++ b/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.html
@@ -17,7 +17,6 @@
 bluetooth_test(() => getMeasurementIntervalCharacteristic()
     .then(_ => ({characteristic, fake_peripheral, fake_service} = _))
     .then(() => fake_service.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
         characteristic.getDescriptors(user_description.uuid),
diff --git a/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.html b/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.html
index 8261511..c9056dd 100644
--- a/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.html
+++ b/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.html
@@ -17,7 +17,6 @@
 bluetooth_test(() => getMeasurementIntervalCharacteristic()
     .then(_ => ({characteristic, fake_peripheral, fake_service} = _))
     .then(() => fake_service.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
         characteristic.getDescriptors(user_description.name),
diff --git a/bluetooth/characteristic/notifications/service-is-removed.https.html b/bluetooth/characteristic/notifications/service-is-removed.https.html
index 58495f4..bf389ce 100644
--- a/bluetooth/characteristic/notifications/service-is-removed.https.html
+++ b/bluetooth/characteristic/notifications/service-is-removed.https.html
@@ -14,7 +14,6 @@
 bluetooth_test(() => getMeasurementIntervalCharacteristic()
     .then(_ => ({characteristic, fake_peripheral, fake_service} = _))
     .then(() => fake_service.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
         characteristic.startNotifications(),
diff --git a/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.html b/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.html
index f03b281..a80bccf 100644
--- a/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.html
+++ b/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.html
@@ -17,7 +17,6 @@
     .then(() => characteristic.getDescriptor(user_description.name))
     .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e))
     .then(() => fake_characteristic.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
       characteristic.readValue(), expected)),
diff --git a/bluetooth/characteristic/readValue/service-is-removed.https.html b/bluetooth/characteristic/readValue/service-is-removed.https.html
index 4c7db9e..48f8127 100644
--- a/bluetooth/characteristic/readValue/service-is-removed.https.html
+++ b/bluetooth/characteristic/readValue/service-is-removed.https.html
@@ -14,7 +14,6 @@
 bluetooth_test(() => getMeasurementIntervalCharacteristic()
     .then(_ => ({characteristic, fake_peripheral, fake_service} = _))
     .then(() => fake_service.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
         characteristic.readValue(),
diff --git a/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.html b/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.html
index 50e1786..d9a9594 100644
--- a/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.html
+++ b/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.html
@@ -17,7 +17,6 @@
     .then(() => characteristic.getDescriptor(user_description.name))
     .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e))
     .then(() => fake_characteristic.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
       characteristic.startNotifications(), expected)),
diff --git a/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.html b/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.html
index 72527ac..1652070 100644
--- a/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.html
+++ b/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.html
@@ -17,7 +17,6 @@
     .then(() => characteristic.getDescriptor(user_description.name))
     .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e))
     .then(() => fake_characteristic.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
       characteristic.writeValue(new Uint8Array(1)), expected)),
diff --git a/bluetooth/characteristic/writeValue/service-is-removed.https.html b/bluetooth/characteristic/writeValue/service-is-removed.https.html
index a610128..2b43bfb 100644
--- a/bluetooth/characteristic/writeValue/service-is-removed.https.html
+++ b/bluetooth/characteristic/writeValue/service-is-removed.https.html
@@ -14,7 +14,6 @@
 bluetooth_test(() => getMeasurementIntervalCharacteristic()
     .then(_ => ({characteristic, fake_peripheral, fake_service} = _))
     .then(() => fake_service.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
         characteristic.writeValue(new ArrayBuffer(1 /* length */)),
diff --git a/bluetooth/descriptor/readValue/gen-service-is-removed.https.html b/bluetooth/descriptor/readValue/gen-service-is-removed.https.html
index 4674464..e453c80 100644
--- a/bluetooth/descriptor/readValue/gen-service-is-removed.https.html
+++ b/bluetooth/descriptor/readValue/gen-service-is-removed.https.html
@@ -15,7 +15,6 @@
 bluetooth_test(() => getUserDescriptionDescriptor()
     .then(_ => ({descriptor, fake_peripheral, fake_service} = _))
     .then(() => fake_service.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
         descriptor.readValue(),
diff --git a/bluetooth/descriptor/writeValue/gen-service-is-removed.https.html b/bluetooth/descriptor/writeValue/gen-service-is-removed.https.html
index 849b45d..acd56c3 100644
--- a/bluetooth/descriptor/writeValue/gen-service-is-removed.https.html
+++ b/bluetooth/descriptor/writeValue/gen-service-is-removed.https.html
@@ -15,7 +15,6 @@
 bluetooth_test(() => getUserDescriptionDescriptor()
     .then(_ => ({descriptor, fake_peripheral, fake_service} = _))
     .then(() => fake_service.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
         descriptor.writeValue(new ArrayBuffer(1 /* length */)),
diff --git a/bluetooth/script-tests/characteristic/characteristic-is-removed.js b/bluetooth/script-tests/characteristic/characteristic-is-removed.js
index 5241ecf..8ff747c 100644
--- a/bluetooth/script-tests/characteristic/characteristic-is-removed.js
+++ b/bluetooth/script-tests/characteristic/characteristic-is-removed.js
@@ -9,7 +9,6 @@
     .then(() => characteristic.getDescriptor(user_description.name))
     .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e))
     .then(() => fake_characteristic.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
       characteristic.CALLS([
diff --git a/bluetooth/script-tests/characteristic/service-is-removed.js b/bluetooth/script-tests/characteristic/service-is-removed.js
index 129a6db..2f58240 100644
--- a/bluetooth/script-tests/characteristic/service-is-removed.js
+++ b/bluetooth/script-tests/characteristic/service-is-removed.js
@@ -9,7 +9,6 @@
 bluetooth_test(() => getMeasurementIntervalCharacteristic()
     .then(_ => ({characteristic, fake_peripheral, fake_service} = _))
     .then(() => fake_service.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
         characteristic.CALLS([
diff --git a/bluetooth/script-tests/descriptor/service-is-removed.js b/bluetooth/script-tests/descriptor/service-is-removed.js
index 1730963..5373364 100644
--- a/bluetooth/script-tests/descriptor/service-is-removed.js
+++ b/bluetooth/script-tests/descriptor/service-is-removed.js
@@ -7,7 +7,6 @@
 bluetooth_test(() => getUserDescriptionDescriptor()
     .then(_ => ({descriptor, fake_peripheral, fake_service} = _))
     .then(() => fake_service.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
         descriptor.CALLS([
diff --git a/bluetooth/script-tests/service/service-is-removed.js b/bluetooth/script-tests/service/service-is-removed.js
index c1390fd..aaf0f14 100644
--- a/bluetooth/script-tests/service/service-is-removed.js
+++ b/bluetooth/script-tests/service/service-is-removed.js
@@ -8,7 +8,6 @@
 bluetooth_test(() => getHealthThermometerService()
     .then(_ => ({service, fake_service, fake_peripheral} = _))
     .then(() => fake_service.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
         service.CALLS([
diff --git a/bluetooth/service/getCharacteristic/gen-service-is-removed.https.html b/bluetooth/service/getCharacteristic/gen-service-is-removed.https.html
index f056401..391c49a 100644
--- a/bluetooth/service/getCharacteristic/gen-service-is-removed.https.html
+++ b/bluetooth/service/getCharacteristic/gen-service-is-removed.https.html
@@ -16,7 +16,6 @@
 bluetooth_test(() => getHealthThermometerService()
     .then(_ => ({service, fake_service, fake_peripheral} = _))
     .then(() => fake_service.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
         service.getCharacteristic('measurement_interval'),
diff --git a/bluetooth/service/getCharacteristics/gen-service-is-removed-with-uuid.https.html b/bluetooth/service/getCharacteristics/gen-service-is-removed-with-uuid.https.html
index 71b6d77..62caaad 100644
--- a/bluetooth/service/getCharacteristics/gen-service-is-removed-with-uuid.https.html
+++ b/bluetooth/service/getCharacteristics/gen-service-is-removed-with-uuid.https.html
@@ -16,7 +16,6 @@
 bluetooth_test(() => getHealthThermometerService()
     .then(_ => ({service, fake_service, fake_peripheral} = _))
     .then(() => fake_service.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
         service.getCharacteristics('measurement_interval'),
diff --git a/bluetooth/service/getCharacteristics/gen-service-is-removed.https.html b/bluetooth/service/getCharacteristics/gen-service-is-removed.https.html
index 2bd7bf7..4868127 100644
--- a/bluetooth/service/getCharacteristics/gen-service-is-removed.https.html
+++ b/bluetooth/service/getCharacteristics/gen-service-is-removed.https.html
@@ -16,7 +16,6 @@
 bluetooth_test(() => getHealthThermometerService()
     .then(_ => ({service, fake_service, fake_peripheral} = _))
     .then(() => fake_service.remove())
-    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS}))
     .then(() => fake_peripheral.simulateGATTServicesChanged())
     .then(() => assert_promise_rejects_with_message(
         service.getCharacteristics(),