Bug 1450351 [wpt PR 10257] - bluetooth: web: test: Use AllResponsesConsumed, a=testonly
authorConley Owens <cco3@chromium.org>
Mon, 09 Apr 2018 22:06:04 +0000
changeset 467272 6e1d4eb09d668dd466dfa880b85adf210e2ad7d7
parent 467271 c35053a6372f9c1c7ef2ccf31adce23c5b4733d3
child 467273 0c8e5aa16ad7b7a4dd3b151404bb9c0b2a7acd16
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1450351, 10257, 569709, 988422, 548125
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1450351 [wpt PR 10257] - bluetooth: web: test: Use AllResponsesConsumed, a=testonly Automatic update from web-platform-testsbluetooth: web: test: Use AllResponsesConsumed This change uses AllResponsesConsumed in the bluetooth Web Platform Tests in order to make sure we have consumed all the anticipatory responses that we've set on our fakes. BUG=569709 Change-Id: I9767792fcd5dda71fabf2f8941638f744aefa2dc Reviewed-on: https://chromium-review.googlesource.com/988422 Commit-Queue: Conley Owens <cco3@chromium.org> Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org> Cr-Commit-Position: refs/heads/master@{#548125} wpt-commits: 148f026e5178b0b8d77e8f374671c9c5ff1545bf wpt-pr: 10257 wpt-commits: 148f026e5178b0b8d77e8f374671c9c5ff1545bf wpt-pr: 10257
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/disconnected.https.html
testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/disconnected_gc.https.html
testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/one-event-per-disconnection.https.html
testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/reconnect-during-disconnected-event.https.html
testing/web-platform/tests/bluetooth/idl/idl-BluetoothDevice.https.html
testing/web-platform/tests/bluetooth/requestDevice/acceptAllDevices/optional-services-missing.https.html
testing/web-platform/tests/bluetooth/requestDevice/blocklisted-service-in-optionalServices.https.html
testing/web-platform/tests/bluetooth/requestDevice/cross-origin-iframe.sub.https.html
testing/web-platform/tests/bluetooth/requestDevice/discovery-succeeds.https.html
testing/web-platform/tests/bluetooth/requestDevice/request-from-sandboxed-iframe.https.html
testing/web-platform/tests/bluetooth/resources/bluetooth-helpers.js
testing/web-platform/tests/bluetooth/script-tests/server/disconnect-called-before.js
testing/web-platform/tests/bluetooth/script-tests/server/invalid-service-name.js
testing/web-platform/tests/bluetooth/script-tests/server/no-permission-absent-service.js
testing/web-platform/tests/bluetooth/script-tests/server/no-permission-for-any-service.js
testing/web-platform/tests/bluetooth/script-tests/server/no-permission-present-service.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-called-before.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-invalid-service-name.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-absent-service.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-for-any-service.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-present-service.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/blocklisted-services-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-before-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-before.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-invalid-service-name.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-absent-service-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-present-service-with-uuid.https.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -402865,45 +402865,45 @@
    "dc7dd900f79a9205af3e904a309d565ae409afe9",
    "testharness"
   ],
   "bluetooth/descriptor/writeValue/gen-service-is-removed.https.html": [
    "07c2dc0a081786302040942a989cc49f6b3fa3ca",
    "testharness"
   ],
   "bluetooth/device/gattserverdisconnected-event/disconnected.https.html": [
-   "ee14803683f17133c6147c2eaf250befbaaf0be1",
+   "709429f27f57c27319fd14bf419dca46e5f8cee8",
    "testharness"
   ],
   "bluetooth/device/gattserverdisconnected-event/disconnected_gc.https.html": [
-   "6b4676f3b9b34ffa45ff616eb9d3c514e33ad471",
+   "4414277635ef6d8fb5fc941635e89587f3615436",
    "testharness"
   ],
   "bluetooth/device/gattserverdisconnected-event/one-event-per-disconnection.https.html": [
-   "a0fbabe94fe246c2031fe4baf30ba52b58a17b36",
+   "fbb48d3173b0a35aa517b4c2ffb649a5a9280870",
    "testharness"
   ],
   "bluetooth/device/gattserverdisconnected-event/reconnect-during-disconnected-event.https.html": [
-   "a66e1df2d870876d06ad0990ea523153539eff0e",
+   "c0142db0ee3a784184fd78b5255054539ae8b880",
    "testharness"
   ],
   "bluetooth/generate.py": [
    "ef112d89bc14d0e9ebbb457798609f6000a80935",
    "support"
   ],
   "bluetooth/generate_test.py": [
    "b8749e25c58da9a903feb5edc84c2d6ed8ebda67",
    "support"
   ],
   "bluetooth/idl/idl-Bluetooth.html": [
    "9ef91a8214b3a46278d8b9b442b34d9052342342",
    "testharness"
   ],
   "bluetooth/idl/idl-BluetoothDevice.https.html": [
-   "b4c78ec760b61420a82f4a1a2951fb2eaa6af10d",
+   "19d0c7b6e08ada8f3ed58921e662fe2d06ed55a4",
    "testharness"
   ],
   "bluetooth/idl/idl-BluetoothUUID.html": [
    "4feb7657e77a18489bbe2d7a98405470c6ce0b82",
    "testharness"
   ],
   "bluetooth/idl/idl-NavigatorBluetooth.html": [
    "fa121bcbea3d19898a71f7dda79708ee941e4b6c",
@@ -402913,29 +402913,29 @@
    "850418b4a67df894ac4b21d2e5a18c5c266d03fd",
    "testharness"
   ],
   "bluetooth/requestDevice/acceptAllDevices/device-with-name.https.html": [
    "e156278ff3af38ebc2695ffd3116039be7889e3e",
    "testharness"
   ],
   "bluetooth/requestDevice/acceptAllDevices/optional-services-missing.https.html": [
-   "c6e28d2c8509ea2f0e3633b2517ad68631119ffe",
+   "1e4a408d0497db72b1f1dc201f278ae7a701e0ab",
    "testharness"
   ],
   "bluetooth/requestDevice/acceptAllDevices/optional-services-present.https.html": [
    "50eaac3e0c94933fa995c102d53b6b00b3087ea6",
    "testharness"
   ],
   "bluetooth/requestDevice/blocklisted-service-in-filter.https.html": [
    "7046c3d32539807824c3abdc95071e8495c619df",
    "testharness"
   ],
   "bluetooth/requestDevice/blocklisted-service-in-optionalServices.https.html": [
-   "c3fbd786e7cf05f72eb0afadba8924c43f2fdc11",
+   "5e3c7ac81089d9a44d07812b43e2ed63e1d39f11",
    "testharness"
   ],
   "bluetooth/requestDevice/canonicalizeFilter/device-name-longer-than-29-bytes.https.html": [
    "238bfa4cae4a577d6725071585d3f4fb17211926",
    "testharness"
   ],
   "bluetooth/requestDevice/canonicalizeFilter/empty-filter.https.html": [
    "dae6caddeebd483e59878e86ca0452dc90bf15ef",
@@ -403009,21 +403009,21 @@
    "084ec334261ed7c584a0888ff3dfdec0f3538bad",
    "testharness"
   ],
   "bluetooth/requestDevice/consumes-user-gesture.https.html": [
    "c76d7e37417a7db3043b761989eebbfded6e6804",
    "testharness"
   ],
   "bluetooth/requestDevice/cross-origin-iframe.sub.https.html": [
-   "dc9df7886d4a020b1853d7a54d67a8b1249c56c7",
+   "e5e22c1b7811699bb8bfd2b6593edf78a270a658",
    "testharness"
   ],
   "bluetooth/requestDevice/discovery-succeeds.https.html": [
-   "da1be25f068cdb9602d6207b6af0170e232e68cd",
+   "0b75576a4742cc7496a890b273f2bb1c1f56017c",
    "testharness"
   ],
   "bluetooth/requestDevice/filter-matches.https.html": [
    "22ea4176f1f5cdd67a730cce43e3fbf08d1fcfdb",
    "testharness"
   ],
   "bluetooth/requestDevice/le-not-supported.https.html": [
    "9870420cf924559cb02144ecd5da02d39f386f30",
@@ -403041,29 +403041,29 @@
    "47b28ec24e902fe0e9593d002f6c7ed88e379b00",
    "testharness"
   ],
   "bluetooth/requestDevice/request-from-iframe.https.html": [
    "4af485c1bb00aacd11225001ed494628063b2684",
    "testharness"
   ],
   "bluetooth/requestDevice/request-from-sandboxed-iframe.https.html": [
-   "917a1be9111f04e67231c92921b1f856685deb55",
+   "fe1db81b730c5facaf45718e4536793f6c10f72a",
    "testharness"
   ],
   "bluetooth/requestDevice/same-device.https.html": [
    "2bf20db77582e6df2674dd0a5cf444d630b3b999",
    "testharness"
   ],
   "bluetooth/requestDevice/single-filter-single-service.https.html": [
    "f147182b894cbb0f338111b146dfa16193610265",
    "testharness"
   ],
   "bluetooth/resources/bluetooth-helpers.js": [
-   "f19d8ab872de44f50c37aac3e3ad97ab0e502b59",
+   "c86347e3b26f369907ec7f0c3adaee20b630ade8",
    "support"
   ],
   "bluetooth/resources/health-thermometer-iframe.html": [
    "f175a62907e65c03e326832449b0b8e3276387d8",
    "support"
   ],
   "bluetooth/script-tests/base_test_html.template": [
    "abe5c81d5d9be9b0c6069ba0a465ca3efc24b442",
@@ -403081,17 +403081,17 @@
    "a9fa621bca75da2887835c529b40429a20ebdff8",
    "support"
   ],
   "bluetooth/script-tests/descriptor/service-is-removed.js": [
    "d442ab654680a3f4c7eae6036f74a20f0b730351",
    "support"
   ],
   "bluetooth/script-tests/server/disconnect-called-before.js": [
-   "3ea0ed09ee2197401437b4d89c335181b2983b17",
+   "e8c31819a1250ec08217766f4b8228aa195a2d97",
    "support"
   ],
   "bluetooth/script-tests/server/disconnect-called-during-error.js": [
    "43089297c181c29f633ed9dc574313aac34d4ba3",
    "support"
   ],
   "bluetooth/script-tests/server/disconnect-called-during-success.js": [
    "25835e2c53793ad800774de819b88939f12ebb82",
@@ -403125,29 +403125,29 @@
    "4b4c9fcadb0ae28becc1888ffc0c738a898f15a5",
    "support"
   ],
   "bluetooth/script-tests/server/get-same-object.js": [
    "30382d56a15bb8b8a2825e265ddf00b489829151",
    "support"
   ],
   "bluetooth/script-tests/server/invalid-service-name.js": [
-   "0c2b3d759291d4e247df131f82daa2be847cb1d9",
+   "b7f6b5db7334b6467ec446fa5b0ea637306c8911",
    "support"
   ],
   "bluetooth/script-tests/server/no-permission-absent-service.js": [
-   "78388409359e9e5bc36b304865e6e14d30769e12",
+   "8b0fb54dfffb7855923c51031969d0b5f9276918",
    "support"
   ],
   "bluetooth/script-tests/server/no-permission-for-any-service.js": [
-   "f9230d7d66815561f575ba55409f2ca4fc0a67b8",
+   "81d9589206bbe46c784b415e3b250f9b05443e60",
    "support"
   ],
   "bluetooth/script-tests/server/no-permission-present-service.js": [
-   "0f2e002be9842eb06f31f63de31c96fcd2820258",
+   "3200cee17040440cfe67a354c1fbc90fe537de81",
    "support"
   ],
   "bluetooth/script-tests/server/service-not-found.js": [
    "b18022b48d354825fa747abda81bc870142d9c59",
    "support"
   ],
   "bluetooth/script-tests/service/blocklisted-characteristic.js": [
    "cdc9a9e30e319c3eb1532ef24436d5fc454d2a5e",
@@ -403205,17 +403205,17 @@
    "06f821cc5fd28c776bbf2c2fc76ffdf80d66742d",
    "testharness"
   ],
   "bluetooth/server/disconnect/gc-detach.https.html": [
    "cba04d22660d31b5b9ad0d21b41f42d7761f5092",
    "testharness"
   ],
   "bluetooth/server/getPrimaryService/gen-disconnect-called-before.https.html": [
-   "d1f9a8a640ae96589e7406e6c296137a08c4ea01",
+   "f4d97a6bd746c3d127378ad9c692b542c114d4e7",
    "testharness"
   ],
   "bluetooth/server/getPrimaryService/gen-disconnect-called-during-error.https.html": [
    "7eb6d88b2ac33e3426144ba374bc2b6730be1b01",
    "testharness"
   ],
   "bluetooth/server/getPrimaryService/gen-disconnect-called-during-success.https.html": [
    "013b1adff7a583f2706943edef16219a4ef12a50",
@@ -403249,61 +403249,61 @@
    "cbd51c9175418a8c4bd031de3b2a2e4ef2ae7bb6",
    "testharness"
   ],
   "bluetooth/server/getPrimaryService/gen-get-same-object.https.html": [
    "a064dd7e8fe4137f0a7a83967907b88766f6466f",
    "testharness"
   ],
   "bluetooth/server/getPrimaryService/gen-invalid-service-name.https.html": [
-   "5728e27aba6861ddfc7cb4278b116ee9d94fbb7a",
+   "4886cfde2f041edb7445c170b1a6c1a61b37f075",
    "testharness"
   ],
   "bluetooth/server/getPrimaryService/gen-no-permission-absent-service.https.html": [
-   "ed7a5e4ab959f5d8b5e72154c68e397128c4d071",
+   "e40e8af7de38257160e5e4ef38f9c85667c5c274",
    "testharness"
   ],
   "bluetooth/server/getPrimaryService/gen-no-permission-for-any-service.https.html": [
-   "86fab4a334c37e61ff9acbeafba071fd0aab5d30",
+   "1b87eb365022aec9c1f30fea557c996f232f6331",
    "testharness"
   ],
   "bluetooth/server/getPrimaryService/gen-no-permission-present-service.https.html": [
-   "46717e75f676ff426773a79c4c01b2412b2c70ee",
+   "2ea2cff3588b10a387a182b31dac40dea52ab7b4",
    "testharness"
   ],
   "bluetooth/server/getPrimaryService/gen-service-not-found.https.html": [
    "9169ed84f3502d5e3e675d5e0e317d0d895b4ca7",
    "testharness"
   ],
   "bluetooth/server/getPrimaryService/service-found.https.html": [
    "ec29d8be9640efcbbfb0a33ae981a561c3a3dc86",
    "testharness"
   ],
   "bluetooth/server/getPrimaryService/two-iframes-from-same-origin.https.html": [
    "5a8304882e2ef286eb43e4f1710df3747f8943f4",
    "testharness"
   ],
   "bluetooth/server/getPrimaryServices/blocklisted-services-with-uuid.https.html": [
-   "a58240662db7a01866c144e95d828cbeb6340a49",
+   "cb92cf7ba078851ccda73c6b069de825af05286b",
    "testharness"
   ],
   "bluetooth/server/getPrimaryServices/blocklisted-services.https.html": [
    "06ca92a6e6d5145762c9d5ae9df78fcc86f2226c",
    "testharness"
   ],
   "bluetooth/server/getPrimaryServices/correct-services.https.html": [
    "255055f835025d77c0a993de042a13d0d2c635cd",
    "testharness"
   ],
   "bluetooth/server/getPrimaryServices/gen-disconnect-called-before-with-uuid.https.html": [
-   "ff1af939fa2b5b77523712a4281839349f00e43b",
+   "18aca22776caae36b47a58866f78a72ecc7f9f79",
    "testharness"
   ],
   "bluetooth/server/getPrimaryServices/gen-disconnect-called-before.https.html": [
-   "b579d5e4ea1762930d2831b082fa6d92810e59c3",
+   "c98a723569159c5a139fd74fac0672590106f258",
    "testharness"
   ],
   "bluetooth/server/getPrimaryServices/gen-disconnect-called-during-error-with-uuid.https.html": [
    "5bf7c1c17795a136624b149d1c63c423de21a22d",
    "testharness"
   ],
   "bluetooth/server/getPrimaryServices/gen-disconnect-called-during-error.https.html": [
    "c9b596491a06833d6dca56cd0dc92895056ccb45",
@@ -403369,33 +403369,33 @@
    "ad2f743b2dab04828ef996ce1912f9d03ddd9d36",
    "testharness"
   ],
   "bluetooth/server/getPrimaryServices/gen-get-same-object.https.html": [
    "62d689a2a97e3f5d2bb22040faf3725d750caae0",
    "testharness"
   ],
   "bluetooth/server/getPrimaryServices/gen-invalid-service-name.https.html": [
-   "878c93bcea918a0d008ab44552f7b26ff6f7a151",
+   "819b61b51d4f9ed60fdedcb3a719aa81c11d0d1b",
    "testharness"
   ],
   "bluetooth/server/getPrimaryServices/gen-no-permission-absent-service-with-uuid.https.html": [
-   "f96b80beb4c79a2bda3cc06bc11d6aa5fb392ada",
+   "bec664d2805d7c98dccf83b93a6d49a145f06e19",
    "testharness"
   ],
   "bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service-with-uuid.https.html": [
-   "96a195a1b25cf1985ccbc949431a28226f3ee684",
+   "4cda505124cfe20c8b8e3630774b4f734eea10fe",
    "testharness"
   ],
   "bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service.https.html": [
-   "618cf409fffba7679abe515982695db4bb1a5f68",
+   "3a9ed522982b890296f926759954d463915818e9",
    "testharness"
   ],
   "bluetooth/server/getPrimaryServices/gen-no-permission-present-service-with-uuid.https.html": [
-   "3126e3b157670506442b0032de53e6d29e4c30f6",
+   "6148df8814a7f9bc7bbad6cb278cffded99bcb9d",
    "testharness"
   ],
   "bluetooth/server/getPrimaryServices/gen-service-not-found-with-uuid.https.html": [
    "e9b4e0205d5d30589356aea481e469a746ee419a",
    "testharness"
   ],
   "bluetooth/server/getPrimaryServices/services-found-with-uuid.https.html": [
    "9106025a145b9c4013600dd15190bf35fcf10f2e",
--- a/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/disconnected.https.html
+++ b/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/disconnected.https.html
@@ -4,16 +4,16 @@
 <script src="/resources/testdriver.js"></script>
 <script src="/resources/testdriver-vendor.js"></script>
 <script src="/bluetooth/resources/bluetooth-helpers.js"></script>
 <script>
 'use strict';
 const test_desc = 'A device disconnecting while connected should fire the ' +
     'gattserverdisconnected event.';
 
-bluetooth_test(() => getHealthThermometerDevice()
+bluetooth_test(() => getConnectedHealthThermometerDevice()
   .then(({device, fake_peripheral}) => {
     fake_peripheral.simulateGATTDisconnection();
     return eventPromise(device, 'gattserverdisconnected');
   })
   .then(e => assert_true(e.bubbles)),
   test_desc);
 </script>
--- a/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/disconnected_gc.https.html
+++ b/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/disconnected_gc.https.html
@@ -4,17 +4,17 @@
 <script src="/resources/testdriver.js"></script>
 <script src="/resources/testdriver-vendor.js"></script>
 <script src="/bluetooth/resources/bluetooth-helpers.js"></script>
 <script>
 'use strict';
 const test_desc = 'A device disconnecting after the BluetoothDevice object ' +
     'has been GC\'ed should not access freed memory.';
 
-bluetooth_test(() => getHealthThermometerDevice()
+bluetooth_test(() => getConnectedHealthThermometerDevice()
   .then(({fake_peripheral}) => {
     // 1. Disconnect.
     fake_peripheral.simulateGATTDisconnection();
     // 2. Run garbage collection.
     fake_peripheral = undefined;
     runGarbageCollection();
   })
   // 3. Wait 50ms after the GC runs for the disconnection event to come back.
--- a/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/one-event-per-disconnection.https.html
+++ b/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/one-event-per-disconnection.https.html
@@ -7,17 +7,17 @@
 <script>
 'use strict';
 const test_desc = 'If a site disconnects from a device while the platform is ' +
     'disconnecting that device, only one gattserverdisconnected event should ' +
     'fire.';
 let device, fake_peripheral;
 let num_events = 0;
 
-bluetooth_test(() => getHealthThermometerDevice()
+bluetooth_test(() => getConnectedHealthThermometerDevice()
   .then(_ => ({device, fake_peripheral} = _))
   // 1. Listen for disconnections.
   .then(() =>
       device.addEventListener('gattserverdisconnected', () => num_events++))
   // 2. Disconnect several times.
   .then(() => Promise.all([
     eventPromise(device, 'gattserverdisconnected'),
     fake_peripheral.simulateGATTDisconnection(),
--- a/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/reconnect-during-disconnected-event.https.html
+++ b/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/reconnect-during-disconnected-event.https.html
@@ -5,17 +5,17 @@
 <script src="/resources/testdriver-vendor.js"></script>
 <script src="/bluetooth/resources/bluetooth-helpers.js"></script>
 <script>
 'use strict';
 let test_desc = 'A device that reconnects during the gattserverdisconnected ' +
     'event should still receive gattserverdisconnected events after ' +
     're-connection.';
 let device, fake_peripheral;
-bluetooth_test(() => getHealthThermometerDevice()
+bluetooth_test(() => getConnectedHealthThermometerDevice()
   .then(_ => ({device, fake_peripheral} = _))
   // 1. Disconnect.
   .then(() => new Promise(resolve => {
     fake_peripheral.simulateGATTDisconnection();
     device.addEventListener(
         'gattserverdisconnected', function onDisconnected() {
       device.removeEventListener('gattserverdisconnected', onDisconnected);
       // 2. Reconnect.
--- a/testing/web-platform/tests/bluetooth/idl/idl-BluetoothDevice.https.html
+++ b/testing/web-platform/tests/bluetooth/idl/idl-BluetoothDevice.https.html
@@ -12,17 +12,17 @@ test(() => {
   assert_throws(new TypeError(), () => new BluetoothDevice(),
       'the constructor should not be callable with "new"');
   assert_throws(new TypeError(), () => BluetoothDevice(),
       'the constructor should not be callable');
 }, test_desc_idl);
 
 const test_desc_attr = 'BluetoothDevice attributes.';
 let device;
-bluetooth_test(() => getHealthThermometerDevice()
+bluetooth_test(() => getConnectedHealthThermometerDevice()
   .then(({device}) => {
     assert_equals(device.constructor.name, 'BluetoothDevice');
     var old_device_id = device.id;
     assert_throws(new TypeError(), () => device.id = 'overwritten',
         'the device id should not be writable');
     assert_throws(new TypeError(), () => device.name = 'overwritten',
         'the device name should not be writable');
     assert_equals(device.id, old_device_id);
--- a/testing/web-platform/tests/bluetooth/requestDevice/acceptAllDevices/optional-services-missing.https.html
+++ b/testing/web-platform/tests/bluetooth/requestDevice/acceptAllDevices/optional-services-missing.https.html
@@ -9,14 +9,14 @@
 const test_desc = 'requestDevice called with acceptAllDevices: true and ' +
     'with no optionalServices. Should not get access to any services.';
 const expected = new DOMException(
     'Origin is not allowed to access any service. ' +
     'Tip: Add the service UUID to \'optionalServices\' in ' +
     'requestDevice() options. https://goo.gl/HxfxSQ',
     'SecurityError');
 
-bluetooth_test(() => getHealthThermometerDevice({acceptAllDevices: true})
+bluetooth_test(() => getConnectedHealthThermometerDevice({acceptAllDevices: true})
     .then(({device}) => assert_promise_rejects_with_message(
       device.gatt.getPrimaryServices(),
       expected)),
     test_desc);
 </script>
--- a/testing/web-platform/tests/bluetooth/requestDevice/blocklisted-service-in-optionalServices.https.html
+++ b/testing/web-platform/tests/bluetooth/requestDevice/blocklisted-service-in-optionalServices.https.html
@@ -17,18 +17,16 @@ let device, fake_peripheral;
 bluetooth_test(() => getDiscoveredHealthThermometerDevice({
   filters: [{services: ['health_thermometer']}],
   optionalServices: ['human_interface_device']
 })
     .then(_ => ({device, fake_peripheral} = _))
     .then(() =>
         fake_peripheral.setNextGATTConnectionResponse({code: HCI_SUCCESS}))
     .then(() => device.gatt.connect())
-    .then(() =>
-        fake_peripheral.setNextGATTDiscoveryResponse({code: HCI_SUCCESS}))
     .then(() => Promise.all([
       assert_promise_rejects_with_message(
         device.gatt.getPrimaryService('human_interface_device'),
         expected, 'Blocklisted service not accessible.'),
       assert_promise_rejects_with_message(
         device.gatt.getPrimaryServices('human_interface_device'),
         expected, 'Blocklisted services not accessible.')])),
     test_desc);
--- a/testing/web-platform/tests/bluetooth/requestDevice/cross-origin-iframe.sub.https.html
+++ b/testing/web-platform/tests/bluetooth/requestDevice/cross-origin-iframe.sub.https.html
@@ -8,17 +8,17 @@
 <script>
 'use strict';
 const test_desc = 'Request device from a unique origin. ' +
     'Should reject with SecurityError.';
 const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
     '/bluetooth/resources/health-thermometer-iframe.html'
 let iframe = document.createElement('iframe');
 
-bluetooth_test(() => setUpConnectableHealthThermometerDevice()
+bluetooth_test(() => setUpHealthThermometerDevice()
     // 1. Load the iframe.
     .then(() => new Promise(resolve => {
       iframe.src = cross_origin_src;
       document.body.appendChild(iframe);
       iframe.addEventListener('load', resolve);
     }))
     // 2. Request the device from the iframe.
     .then(() => new Promise(resolve => {
--- a/testing/web-platform/tests/bluetooth/requestDevice/discovery-succeeds.https.html
+++ b/testing/web-platform/tests/bluetooth/requestDevice/discovery-succeeds.https.html
@@ -3,17 +3,17 @@
 <script src="/resources/testharnessreport.js"></script>
 <script src="/resources/testdriver.js"></script>
 <script src="/resources/testdriver-vendor.js"></script>
 <script src="/bluetooth/resources/bluetooth-helpers.js"></script>
 <script>
 'use strict';
 const test_desc = 'Discover a device using alias, name, or UUID.';
 
-bluetooth_test(() => getHealthThermometerDevice()
+bluetooth_test(() => getConnectedHealthThermometerDevice()
     // Chrome will always close the previous chooser in the process of handling
     // a user gesture for the next request, so these need to be done
     // sequentially.
     .then(() => requestDeviceWithTrustedClick({
       filters: [{services: [health_thermometer.alias]}]
     }))
     .then(device => assert_equals(device.constructor.name, 'BluetoothDevice'))
     .then(() => requestDeviceWithTrustedClick({
--- a/testing/web-platform/tests/bluetooth/requestDevice/request-from-sandboxed-iframe.https.html
+++ b/testing/web-platform/tests/bluetooth/requestDevice/request-from-sandboxed-iframe.https.html
@@ -9,17 +9,17 @@
 'use strict';
 const test_desc = 'Request device from a unique origin. ' +
     'Should reject with SecurityError.';
 const expected = 'SecurityError: requestDevice() called from cross-origin ' +
     'iframe.';
 
 let iframe = document.createElement('iframe');
 
-bluetooth_test(() => getHealthThermometerDevice()
+bluetooth_test(() => getConnectedHealthThermometerDevice()
     // 1. Load the iframe.
     .then(() => new Promise(resolve => {
       iframe.sandbox.add('allow-scripts');
       iframe.src = '/bluetooth/resources/health-thermometer-iframe.html';
       document.body.appendChild(iframe);
       iframe.addEventListener('load', resolve);
     }))
     // 2. Request the device from the iframe.
--- a/testing/web-platform/tests/bluetooth/resources/bluetooth-helpers.js
+++ b/testing/web-platform/tests/bluetooth/resources/bluetooth-helpers.js
@@ -61,17 +61,19 @@ function performChromiumSetup() {
 // These tests rely on the User Agent providing an implementation of the
 // Web Bluetooth Testing API.
 // https://docs.google.com/document/d/1Nhv_oVDCodd1pEH_jj9k8gF4rPGb_84VYaZ9IG8M_WY/edit?ts=59b6d823#heading=h.7nki9mck5t64
 function bluetooth_test(func, name, properties) {
   Promise.resolve()
     .then(() => promise_test(t => Promise.resolve()
       // Trigger Chromium-specific setup.
       .then(performChromiumSetup)
-      .then(() => func(t)), name, properties));
+      .then(() => func(t))
+      .then(() => navigator.bluetooth.test.allResponsesConsumed())
+      .then(consumed => assert_true(consumed)), name, properties));
 }
 
 // HCI Error Codes. Used for simulateGATT[Dis]ConnectionResponse.
 // For a complete list of possible error codes see
 // BT 4.2 Vol 2 Part D 1.3 List Of Error Codes.
 const HCI_SUCCESS = 0x0000;
 const HCI_CONNECTION_TIMEOUT = 0x0008;
 
@@ -921,52 +923,63 @@ function getEmptyHealthThermometerServic
 
 // Returns a BluetoothDevice discovered using |options| and its
 // corresponding FakePeripheral.
 // The simulated device is called 'HID Device' it has three known service
 // UUIDs: 'generic_access', 'device_information', 'human_interface_device'.
 // The primary service with 'device_information' UUID has a characteristics
 // with UUID 'serial_number_string'. The device has been connected to and its
 // attributes are ready to be discovered.
+function getHIDDevice(options) {
+  let device, fake_peripheral;
+  return getConnectedHIDDevice(options)
+    .then(_ => ({device, fake_peripheral} = _))
+    .then(() => fake_peripheral.setNextGATTDiscoveryResponse({
+      code: HCI_SUCCESS,
+    }))
+    .then(() => ({device, fake_peripheral}));
+}
+
+// Similar to getHealthThermometerDevice except the GATT discovery
+// response has not been set yet so more attributes can still be added.
 // TODO(crbug.com/719816): Add descriptors.
-function getHIDDevice(options) {
+function getConnectedHIDDevice(options) {
+  let device, fake_peripheral;
   return setUpPreconnectedDevice({
       address: '10:10:10:10:10:10',
       name: 'HID Device',
       knownServiceUUIDs: [
         'generic_access',
         'device_information',
-        'human_interface_device'
+        'human_interface_device',
       ],
     })
-    .then(fake_peripheral => {
-      return requestDeviceWithTrustedClick(options)
-        .then(device => {
-          return fake_peripheral
-            .setNextGATTConnectionResponse({
-              code: HCI_SUCCESS})
-            .then(() => device.gatt.connect())
-            .then(() => fake_peripheral.addFakeService({
-              uuid: 'generic_access'}))
-            .then(() => fake_peripheral.addFakeService({
-              uuid: 'device_information'}))
-            // Blocklisted Characteristic:
-            // https://github.com/WebBluetoothCG/registries/blob/master/gatt_blocklist.txt
-            .then(dev_info => dev_info.addFakeCharacteristic({
-              uuid: 'serial_number_string', properties: ['read']}))
-            .then(() => fake_peripheral.addFakeService({
-              uuid: 'human_interface_device'}))
-            .then(() => fake_peripheral.setNextGATTDiscoveryResponse({
-              code: HCI_SUCCESS}))
-            .then(() => ({
-              device: device,
-              fake_peripheral: fake_peripheral
-            }));
-        });
-    });
+    .then(_ => (fake_peripheral = _))
+    .then(() => requestDeviceWithTrustedClick(options))
+    .then(_ => (device = _))
+    .then(() => fake_peripheral.setNextGATTConnectionResponse({
+      code: HCI_SUCCESS,
+    }))
+    .then(() => device.gatt.connect())
+    .then(() => fake_peripheral.addFakeService({
+      uuid: 'generic_access',
+    }))
+    .then(() => fake_peripheral.addFakeService({
+      uuid: 'device_information',
+    }))
+    // Blocklisted Characteristic:
+    // https://github.com/WebBluetoothCG/registries/blob/master/gatt_blocklist.txt
+    .then(dev_info => dev_info.addFakeCharacteristic({
+      uuid: 'serial_number_string',
+      properties: ['read'],
+    }))
+    .then(() => fake_peripheral.addFakeService({
+      uuid: 'human_interface_device',
+    }))
+    .then(() => ({device, fake_peripheral}));
 }
 
 // Similar to getHealthThermometerDevice() except the device
 // is not connected and thus its services have not been
 // discovered.
 function getDiscoveredHealthThermometerDevice(
   options = {filters: [{services: ['health_thermometer']}]}) {
   return setUpHealthThermometerDevice()
--- a/testing/web-platform/tests/bluetooth/script-tests/server/disconnect-called-before.js
+++ b/testing/web-platform/tests/bluetooth/script-tests/server/disconnect-called-before.js
@@ -2,17 +2,17 @@
 const test_desc = 'disconnect() called before FUNCTION_NAME. ' +
     'Reject with NetworkError.';
 const expected = new DOMException(
     'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
     'first with `device.gatt.connect`.',
     'NetworkError');
 let device;
 
-bluetooth_test(() => getHealthThermometerDevice({
+bluetooth_test(() => getConnectedHealthThermometerDevice({
       filters: [{services: ['health_thermometer']}],
       optionalServices: ['generic_access']
     })
     .then(_ => ({device} = _))
     .then(() => device.gatt.disconnect())
     .then(() => assert_promise_rejects_with_message(
         device.gatt.CALLS([
           getPrimaryService('health_thermometer')|
--- a/testing/web-platform/tests/bluetooth/script-tests/server/invalid-service-name.js
+++ b/testing/web-platform/tests/bluetooth/script-tests/server/invalid-service-name.js
@@ -6,17 +6,17 @@ const expected = new DOMException(
     "'wrong_name'. It must be a valid UUID alias (e.g. 0x1234), " +
     "UUID (lowercase hex characters e.g. " +
     "'00001234-0000-1000-8000-00805f9b34fb'), " +
     "or recognized standard name from " +
     "https://www.bluetooth.com/specifications/gatt/services" +
     " e.g. 'alert_notification'.",
     'TypeError');
 
-bluetooth_test(() => getHealthThermometerDevice()
+bluetooth_test(() => getConnectedHealthThermometerDevice()
     .then(({device}) => assert_promise_rejects_with_message(
         device.gatt.CALLS([
           getPrimaryService('wrong_name')|
           getPrimaryServices('wrong_name')
         ]),
         expected,
         'Wrong Service name passed.')),
     test_desc);
--- a/testing/web-platform/tests/bluetooth/script-tests/server/no-permission-absent-service.js
+++ b/testing/web-platform/tests/bluetooth/script-tests/server/no-permission-absent-service.js
@@ -2,17 +2,17 @@
 const test_desc = 'Request for absent service without permission. ' +
     'Reject with SecurityError.';
 const expected = new DOMException(
     'Origin is not allowed to access the service. Tip: Add the service UUID ' +
     'to \'optionalServices\' in requestDevice() options. ' +
     'https://goo.gl/HxfxSQ',
     'SecurityError');
 
-bluetooth_test(() => getHealthThermometerDevice({
+bluetooth_test(() => getConnectedHealthThermometerDevice({
       filters: [{services: ['health_thermometer']}]
     })
     .then(({device}) => Promise.all([
       assert_promise_rejects_with_message(
           device.gatt.CALLS([
             getPrimaryService(glucose.alias)|
             getPrimaryServices(glucose.alias)[UUID]
           ]), expected),
--- a/testing/web-platform/tests/bluetooth/script-tests/server/no-permission-for-any-service.js
+++ b/testing/web-platform/tests/bluetooth/script-tests/server/no-permission-for-any-service.js
@@ -2,16 +2,16 @@
 const test_desc = 'Request for present service without permission to access ' +
     'any service. Reject with SecurityError.';
 const expected = new DOMException(
     'Origin is not allowed to access any service. Tip: Add the service ' +
     'UUID to \'optionalServices\' in requestDevice() options. ' +
     'https://goo.gl/HxfxSQ',
      'SecurityError');
 
-bluetooth_test(() => getHealthThermometerDevice({acceptAllDevices: true})
+bluetooth_test(() => getConnectedHealthThermometerDevice({acceptAllDevices: true})
     .then(({device}) => assert_promise_rejects_with_message(
         device.gatt.CALLS([
           getPrimaryService('heart_rate')|
           getPrimaryServices()|
           getPrimaryServices('heart_rate')[UUID]]),
         expected)),
     test_desc);
--- a/testing/web-platform/tests/bluetooth/script-tests/server/no-permission-present-service.js
+++ b/testing/web-platform/tests/bluetooth/script-tests/server/no-permission-present-service.js
@@ -1,17 +1,17 @@
 'use strict';
 const test_desc = 'Request for present service without permission. ' +
     'Reject with SecurityError.';
 const expected = new DOMException(
     'Origin is not allowed to access the service. Tip: Add the service UUID ' +
     'to \'optionalServices\' in requestDevice() options. https://goo.gl/HxfxSQ',
     'SecurityError');
 
-bluetooth_test(() => getHealthThermometerDevice({
+bluetooth_test(() => getConnectedHealthThermometerDevice({
       filters: [{services: ['health_thermometer']}]
     })
     .then(({device}) => Promise.all([
       assert_promise_rejects_with_message(
           device.gatt.CALLS([
             getPrimaryService(generic_access.alias)|
             getPrimaryServices(generic_access.alias)[UUID]
           ]), expected),
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-called-before.https.html
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-called-before.https.html
@@ -10,17 +10,17 @@
 const test_desc = 'disconnect() called before getPrimaryService. ' +
     'Reject with NetworkError.';
 const expected = new DOMException(
     'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
     'first with `device.gatt.connect`.',
     'NetworkError');
 let device;
 
-bluetooth_test(() => getHealthThermometerDevice({
+bluetooth_test(() => getConnectedHealthThermometerDevice({
       filters: [{services: ['health_thermometer']}],
       optionalServices: ['generic_access']
     })
     .then(_ => ({device} = _))
     .then(() => device.gatt.disconnect())
     .then(() => assert_promise_rejects_with_message(
         device.gatt.getPrimaryService('health_thermometer'),
         expected)),
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-invalid-service-name.https.html
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-invalid-service-name.https.html
@@ -14,16 +14,16 @@ const expected = new DOMException(
     "'wrong_name'. It must be a valid UUID alias (e.g. 0x1234), " +
     "UUID (lowercase hex characters e.g. " +
     "'00001234-0000-1000-8000-00805f9b34fb'), " +
     "or recognized standard name from " +
     "https://www.bluetooth.com/specifications/gatt/services" +
     " e.g. 'alert_notification'.",
     'TypeError');
 
-bluetooth_test(() => getHealthThermometerDevice()
+bluetooth_test(() => getConnectedHealthThermometerDevice()
     .then(({device}) => assert_promise_rejects_with_message(
         device.gatt.getPrimaryService('wrong_name'),
         expected,
         'Wrong Service name passed.')),
     test_desc);
 
 </script>
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-absent-service.https.html
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-absent-service.https.html
@@ -10,17 +10,17 @@
 const test_desc = 'Request for absent service without permission. ' +
     'Reject with SecurityError.';
 const expected = new DOMException(
     'Origin is not allowed to access the service. Tip: Add the service UUID ' +
     'to \'optionalServices\' in requestDevice() options. ' +
     'https://goo.gl/HxfxSQ',
     'SecurityError');
 
-bluetooth_test(() => getHealthThermometerDevice({
+bluetooth_test(() => getConnectedHealthThermometerDevice({
       filters: [{services: ['health_thermometer']}]
     })
     .then(({device}) => Promise.all([
       assert_promise_rejects_with_message(
           device.gatt.getPrimaryService(glucose.alias), expected),
       assert_promise_rejects_with_message(
           device.gatt.getPrimaryService(glucose.name), expected),
       assert_promise_rejects_with_message(
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-for-any-service.https.html
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-for-any-service.https.html
@@ -10,15 +10,15 @@
 const test_desc = 'Request for present service without permission to access ' +
     'any service. Reject with SecurityError.';
 const expected = new DOMException(
     'Origin is not allowed to access any service. Tip: Add the service ' +
     'UUID to \'optionalServices\' in requestDevice() options. ' +
     'https://goo.gl/HxfxSQ',
      'SecurityError');
 
-bluetooth_test(() => getHealthThermometerDevice({acceptAllDevices: true})
+bluetooth_test(() => getConnectedHealthThermometerDevice({acceptAllDevices: true})
     .then(({device}) => assert_promise_rejects_with_message(
         device.gatt.getPrimaryService('heart_rate'),
         expected)),
     test_desc);
 
 </script>
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-present-service.https.html
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-present-service.https.html
@@ -9,17 +9,17 @@
 'use strict';
 const test_desc = 'Request for present service without permission. ' +
     'Reject with SecurityError.';
 const expected = new DOMException(
     'Origin is not allowed to access the service. Tip: Add the service UUID ' +
     'to \'optionalServices\' in requestDevice() options. https://goo.gl/HxfxSQ',
     'SecurityError');
 
-bluetooth_test(() => getHealthThermometerDevice({
+bluetooth_test(() => getConnectedHealthThermometerDevice({
       filters: [{services: ['health_thermometer']}]
     })
     .then(({device}) => Promise.all([
       assert_promise_rejects_with_message(
           device.gatt.getPrimaryService(generic_access.alias), expected),
       assert_promise_rejects_with_message(
           device.gatt.getPrimaryService(generic_access.name), expected),
       assert_promise_rejects_with_message(
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/blocklisted-services-with-uuid.https.html
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/blocklisted-services-with-uuid.https.html
@@ -7,17 +7,17 @@
 <script>
 'use strict';
 const test_desc = 'Request for services. Does not return blocklisted service.';
 const expected = new DOMException(
     'Origin is not allowed to access the service. Tip: Add the service ' +
     'UUID to \'optionalServices\' in requestDevice() options. ' +
     'https://goo.gl/HxfxSQ', 'SecurityError');
 
-bluetooth_test(() => getHIDDevice({
+bluetooth_test(() => getConnectedHIDDevice({
   filters: [{services: ['device_information']}],
   optionalServices: ['human_interface_device']
 })
     .then(({device}) => assert_promise_rejects_with_message(
         device.gatt.getPrimaryServices('human_interface_device'),
         expected)),
     test_desc);
 </script>
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-before-with-uuid.https.html
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-before-with-uuid.https.html
@@ -10,17 +10,17 @@
 const test_desc = 'disconnect() called before getPrimaryServices. ' +
     'Reject with NetworkError.';
 const expected = new DOMException(
     'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
     'first with `device.gatt.connect`.',
     'NetworkError');
 let device;
 
-bluetooth_test(() => getHealthThermometerDevice({
+bluetooth_test(() => getConnectedHealthThermometerDevice({
       filters: [{services: ['health_thermometer']}],
       optionalServices: ['generic_access']
     })
     .then(_ => ({device} = _))
     .then(() => device.gatt.disconnect())
     .then(() => assert_promise_rejects_with_message(
         device.gatt.getPrimaryServices('health_thermometer'),
         expected)),
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-before.https.html
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-before.https.html
@@ -10,17 +10,17 @@
 const test_desc = 'disconnect() called before getPrimaryServices. ' +
     'Reject with NetworkError.';
 const expected = new DOMException(
     'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
     'first with `device.gatt.connect`.',
     'NetworkError');
 let device;
 
-bluetooth_test(() => getHealthThermometerDevice({
+bluetooth_test(() => getConnectedHealthThermometerDevice({
       filters: [{services: ['health_thermometer']}],
       optionalServices: ['generic_access']
     })
     .then(_ => ({device} = _))
     .then(() => device.gatt.disconnect())
     .then(() => assert_promise_rejects_with_message(
         device.gatt.getPrimaryServices(),
         expected)),
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-invalid-service-name.https.html
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-invalid-service-name.https.html
@@ -14,16 +14,16 @@ const expected = new DOMException(
     "'wrong_name'. It must be a valid UUID alias (e.g. 0x1234), " +
     "UUID (lowercase hex characters e.g. " +
     "'00001234-0000-1000-8000-00805f9b34fb'), " +
     "or recognized standard name from " +
     "https://www.bluetooth.com/specifications/gatt/services" +
     " e.g. 'alert_notification'.",
     'TypeError');
 
-bluetooth_test(() => getHealthThermometerDevice()
+bluetooth_test(() => getConnectedHealthThermometerDevice()
     .then(({device}) => assert_promise_rejects_with_message(
         device.gatt.getPrimaryServices('wrong_name'),
         expected,
         'Wrong Service name passed.')),
     test_desc);
 
 </script>
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-absent-service-with-uuid.https.html
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-absent-service-with-uuid.https.html
@@ -10,17 +10,17 @@
 const test_desc = 'Request for absent service without permission. ' +
     'Reject with SecurityError.';
 const expected = new DOMException(
     'Origin is not allowed to access the service. Tip: Add the service UUID ' +
     'to \'optionalServices\' in requestDevice() options. ' +
     'https://goo.gl/HxfxSQ',
     'SecurityError');
 
-bluetooth_test(() => getHealthThermometerDevice({
+bluetooth_test(() => getConnectedHealthThermometerDevice({
       filters: [{services: ['health_thermometer']}]
     })
     .then(({device}) => Promise.all([
       assert_promise_rejects_with_message(
           device.gatt.getPrimaryServices(glucose.alias), expected),
       assert_promise_rejects_with_message(
           device.gatt.getPrimaryServices(glucose.name), expected),
       assert_promise_rejects_with_message(
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service-with-uuid.https.html
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service-with-uuid.https.html
@@ -10,15 +10,15 @@
 const test_desc = 'Request for present service without permission to access ' +
     'any service. Reject with SecurityError.';
 const expected = new DOMException(
     'Origin is not allowed to access any service. Tip: Add the service ' +
     'UUID to \'optionalServices\' in requestDevice() options. ' +
     'https://goo.gl/HxfxSQ',
      'SecurityError');
 
-bluetooth_test(() => getHealthThermometerDevice({acceptAllDevices: true})
+bluetooth_test(() => getConnectedHealthThermometerDevice({acceptAllDevices: true})
     .then(({device}) => assert_promise_rejects_with_message(
         device.gatt.getPrimaryServices('heart_rate'),
         expected)),
     test_desc);
 
 </script>
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service.https.html
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service.https.html
@@ -10,15 +10,15 @@
 const test_desc = 'Request for present service without permission to access ' +
     'any service. Reject with SecurityError.';
 const expected = new DOMException(
     'Origin is not allowed to access any service. Tip: Add the service ' +
     'UUID to \'optionalServices\' in requestDevice() options. ' +
     'https://goo.gl/HxfxSQ',
      'SecurityError');
 
-bluetooth_test(() => getHealthThermometerDevice({acceptAllDevices: true})
+bluetooth_test(() => getConnectedHealthThermometerDevice({acceptAllDevices: true})
     .then(({device}) => assert_promise_rejects_with_message(
         device.gatt.getPrimaryServices(),
         expected)),
     test_desc);
 
 </script>
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-present-service-with-uuid.https.html
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-present-service-with-uuid.https.html
@@ -9,17 +9,17 @@
 'use strict';
 const test_desc = 'Request for present service without permission. ' +
     'Reject with SecurityError.';
 const expected = new DOMException(
     'Origin is not allowed to access the service. Tip: Add the service UUID ' +
     'to \'optionalServices\' in requestDevice() options. https://goo.gl/HxfxSQ',
     'SecurityError');
 
-bluetooth_test(() => getHealthThermometerDevice({
+bluetooth_test(() => getConnectedHealthThermometerDevice({
       filters: [{services: ['health_thermometer']}]
     })
     .then(({device}) => Promise.all([
       assert_promise_rejects_with_message(
           device.gatt.getPrimaryServices(generic_access.alias), expected),
       assert_promise_rejects_with_message(
           device.gatt.getPrimaryServices(generic_access.name), expected),
       assert_promise_rejects_with_message(