From 2d61799f083aba95dc3a401602d856e21e312dd2 Mon Sep 17 00:00:00 2001 From: Ovidio Henriquez Date: Tue, 28 Apr 2020 11:44:08 +0000 Subject: [PATCH] Bug 1631973 [wpt PR 23157] - bluetooth: Split bluetooth-helpers.js, a=testonly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatic update from web-platform-tests bluetooth: Split bluetooth-helpers.js This change splits the bluetooth-helpers.js files in two. The new bluetooth-test.js file contains methods for setting up the web tests and for asserting conditions. The bluetooth-helpers.js file now contains helper methods that set up fake Bluetooth devices for use in the Web Bluetooth tests. I added JsDoc style comments to the helper methods to make it clear what kinds of objects are expected as parameters and what the methods will return. I also reordered the bluetooth-helpers.js methods so that they are defined before they are used. Bug: 1070816 Change-Id: Ib5215555be2b24b11f8dea9098d83ad69719a284 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2149909 Reviewed-by: Reilly Grant Reviewed-by: James Hollyer Commit-Queue: Ovidio de Jesús Ruiz-Henríquez Cr-Commit-Position: refs/heads/master@{#762594} -- wpt-commits: 6f8f0b30a4af91762427b4ff528ed344d5636c6d wpt-pr: 23157 --- .../web-platform/tests/bluetooth/README.md | 11 +- ...ter-absent-getAvailability.https.window.js | 3 +- ...pter-added-getAvailability.https.window.js | 3 +- ...owered-off-getAvailability.https.window.js | 3 +- ...powered-on-getAvailability.https.window.js | 3 +- ...-on-off-on-getAvailability.https.window.js | 3 +- ...er-removed-getAvailability.https.window.js | 3 +- ...iframe-getAvailability.sub.https.window.js | 3 +- .../characteristicProperties.https.window.js | 3 +- ...-characteristic-is-removed.https.window.js | 3 +- ...descriptor-get-same-object.https.window.js | 3 +- .../gen-service-is-removed.https.window.js | 3 +- ...istic-is-removed-with-uuid.https.window.js | 3 +- ...-characteristic-is-removed.https.window.js | 3 +- ...descriptor-get-same-object.https.window.js | 3 +- ...rvice-is-removed-with-uuid.https.window.js | 3 +- .../gen-service-is-removed.https.window.js | 3 +- .../characteristic-is-removed.https.window.js | 3 +- .../service-is-removed.https.window.js | 3 +- ...d-multiple-event-listeners.https.window.js | 3 +- .../characteristic-is-removed.https.window.js | 3 +- .../readValue/event-is-fired.https.window.js | 3 +- ...-characteristic-is-removed.https.window.js | 3 +- .../readValue/read-succeeds.https.window.js | 3 +- .../read-updates-value.https.window.js | 3 +- .../service-is-removed.https.window.js | 3 +- ...ame-from-2-characteristics.https.window.js | 3 +- .../service-same-object.https.window.js | 3 +- ...-characteristic-is-removed.https.window.js | 3 +- .../buffer-is-detached.https.window.js | 3 +- .../characteristic-is-removed.https.window.js | 3 +- ...-characteristic-is-removed.https.window.js | 3 +- .../service-is-removed.https.window.js | 3 +- .../writeValue/write-succeeds.https.window.js | 3 +- .../gen-service-is-removed.https.window.js | 3 +- .../readValue/read-succeeds.https.window.js | 3 +- .../buffer-is-detached.https.window.js | 3 +- .../gen-service-is-removed.https.window.js | 3 +- .../disconnected.https.window.js | 3 +- .../disconnected_gc.https.window.js | 3 +- ...ne-event-per-disconnection.https.window.js | 3 +- ...-during-disconnected-event.https.window.js | 3 +- ...nted-devices-with-services.https.window.js | 5 +- .../no-granted-devices.https.window.js | 5 +- ...me-bluetooth-device-object.https.window.js | 5 +- .../idl/idl-BluetoothDevice.https.html | 3 +- .../device-with-empty-name.https.html | 3 +- .../device-with-name.https.html | 3 +- .../optional-services-missing.https.html | 3 +- .../optional-services-present.https.html | 3 +- .../blocklisted-service-in-filter.https.html | 3 +- ...ted-service-in-optionalServices.https.html | 3 +- ...evice-name-longer-than-29-bytes.https.html | 3 +- .../empty-filter.https.html | 3 +- .../empty-filters-member.https.html | 3 +- .../empty-namePrefix.https.html | 3 +- .../empty-services-member.https.html | 3 +- .../filters-xor-acceptAllDevices.https.html | 3 +- ...ax-length-exceeded-name-unicode.https.html | 3 +- .../max-length-exceeded-name.https.html | 3 +- ...gth-exceeded-namePrefix-unicode.https.html | 3 +- .../max-length-exceeded-namePrefix.https.html | 3 +- .../max-length-name-unicode.https.html | 3 +- .../max-length-name.https.html | 3 +- .../max-length-namePrefix-unicode.https.html | 3 +- .../max-length-namePrefix.https.html | 3 +- .../no-arguments.https.html | 3 +- .../unicode-valid-length-name-name.https.html | 3 +- ...de-valid-length-name-namePrefix.https.html | 3 +- ...vice-in-optionalServices-member.https.html | 3 +- ...rong-service-in-services-member.https.html | 3 +- .../cross-origin-iframe.sub.https.html | 3 +- .../discovery-succeeds.https.html | 3 +- .../doesnt-consume-user-gesture.https.html | 3 +- .../requestDevice/filter-matches.https.html | 3 +- .../requestDevice/le-not-supported.https.html | 3 +- ...y-device-from-name-empty-filter.https.html | 3 +- .../not-processing-user-gesture.https.html | 3 +- .../radio-not-present.https.html | 3 +- .../request-from-iframe.https.html | 3 +- .../request-from-sandboxed-iframe.https.html | 3 +- .../requestDevice/same-device.https.html | 3 +- .../single-filter-single-service.https.html | 3 +- .../resources/bluetooth-fake-devices.js | 991 ++++++++++++++++ .../bluetooth/resources/bluetooth-helpers.js | 1022 ----------------- .../resources/bluetooth-scanning-helpers.js | 2 +- .../bluetooth/resources/bluetooth-test.js | 384 +++++++ .../script-tests/base_test_js.template | 3 +- .../connect/connection-succeeds.https.html | 3 +- ...e-collection-ran-during-success.https.html | 3 +- .../connect/get-same-gatt-server.https.html | 3 +- .../server/device-same-object.https.html | 3 +- .../connect-disconnect-twice.https.html | 3 +- .../server/disconnect/detach-gc.https.html | 3 +- .../disconnect-twice-in-a-row.https.html | 3 +- .../server/disconnect/gc-detach.https.html | 3 +- ...n-disconnect-called-before.https.window.js | 3 +- ...onnect-called-during-error.https.window.js | 3 +- ...nect-called-during-success.https.window.js | 3 +- ...onnect-invalidates-objects.https.window.js | 3 +- .../gen-disconnected-device.https.window.js | 3 +- ...-permission-absent-service.https.window.js | 3 +- ...complete-service-not-found.https.window.js | 3 +- ...ollection-ran-during-error.https.window.js | 3 +- ...lection-ran-during-success.https.window.js | 3 +- ...service-after-reconnection.https.window.js | 3 +- .../gen-get-same-object.https.window.js | 3 +- .../gen-invalid-service-name.https.window.js | 3 +- ...-permission-absent-service.https.window.js | 3 +- ...permission-for-any-service.https.window.js | 3 +- ...permission-present-service.https.window.js | 3 +- .../gen-service-not-found.https.window.js | 3 +- .../service-found.https.html | 3 +- .../two-iframes-from-same-origin.https.html | 3 +- .../blocklisted-services-with-uuid.https.html | 3 +- .../blocklisted-services.https.html | 3 +- .../correct-services.https.html | 3 +- ...ct-called-before-with-uuid.https.window.js | 3 +- ...n-disconnect-called-before.https.window.js | 3 +- ...led-during-error-with-uuid.https.window.js | 3 +- ...onnect-called-during-error.https.window.js | 3 +- ...d-during-success-with-uuid.https.window.js | 3 +- ...nect-called-during-success.https.window.js | 3 +- ...alidates-objects-with-uuid.https.window.js | 3 +- ...onnect-invalidates-objects.https.window.js | 3 +- ...connected-device-with-uuid.https.window.js | 3 +- .../gen-disconnected-device.https.window.js | 3 +- ...n-absent-service-with-uuid.https.window.js | 3 +- ...ervice-not-found-with-uuid.https.window.js | 3 +- ...ran-during-error-with-uuid.https.window.js | 3 +- ...ollection-ran-during-error.https.window.js | 3 +- ...n-during-success-with-uuid.https.window.js | 3 +- ...lection-ran-during-success.https.window.js | 3 +- ...ter-reconnection-with-uuid.https.window.js | 3 +- ...service-after-reconnection.https.window.js | 3 +- ...-get-same-object-with-uuid.https.window.js | 3 +- .../gen-get-same-object.https.window.js | 3 +- .../gen-invalid-service-name.https.window.js | 3 +- ...n-absent-service-with-uuid.https.window.js | 3 +- ...-for-any-service-with-uuid.https.window.js | 3 +- ...permission-for-any-service.https.window.js | 3 +- ...-present-service-with-uuid.https.window.js | 3 +- ...ervice-not-found-with-uuid.https.window.js | 3 +- .../services-found-with-uuid.https.html | 3 +- .../services-found.https.html | 3 +- .../services-not-found.https.html | 3 +- .../device-same-from-2-services.https.html | 3 +- .../service/device-same-object.https.html | 3 +- .../characteristic-found.https.html | 3 +- ...blocklisted-characteristic.https.window.js | 3 +- ...n-characteristic-not-found.https.window.js | 3 +- ...ollection-ran-during-error.https.window.js | 3 +- .../gen-get-same-object.https.window.js | 3 +- ...nvalid-characteristic-name.https.window.js | 3 +- .../gen-reconnect-during.https.window.js | 3 +- .../gen-service-is-removed.https.window.js | 3 +- .../blocklisted-characteristics.https.html | 3 +- ...characteristics-found-with-uuid.https.html | 3 +- .../characteristics-found.https.html | 3 +- .../characteristics-not-found.https.html | 3 +- ...d-characteristic-with-uuid.https.window.js | 3 +- ...ristic-not-found-with-uuid.https.window.js | 3 +- ...ran-during-error-with-uuid.https.window.js | 3 +- ...ollection-ran-during-error.https.window.js | 3 +- ...-get-same-object-with-uuid.https.window.js | 3 +- .../gen-get-same-object.https.window.js | 3 +- ...nvalid-characteristic-name.https.window.js | 3 +- ...reconnect-during-with-uuid.https.window.js | 3 +- .../gen-reconnect-during.https.window.js | 3 +- ...rvice-is-removed-with-uuid.https.window.js | 3 +- .../gen-service-is-removed.https.window.js | 3 +- 171 files changed, 1717 insertions(+), 1197 deletions(-) create mode 100644 testing/web-platform/tests/bluetooth/resources/bluetooth-fake-devices.js delete mode 100644 testing/web-platform/tests/bluetooth/resources/bluetooth-helpers.js create mode 100644 testing/web-platform/tests/bluetooth/resources/bluetooth-test.js diff --git a/testing/web-platform/tests/bluetooth/README.md b/testing/web-platform/tests/bluetooth/README.md index e7997c9fa26d..abe277712bc4 100644 --- a/testing/web-platform/tests/bluetooth/README.md +++ b/testing/web-platform/tests/bluetooth/README.md @@ -10,10 +10,11 @@ Testing] test API which must be provided by browsers under test. TODO([#485]): Update the links to [FakeBluetooth][Web Bluetooth Testing] to point to the [Testing Web Bluetooth specification]. -In this test suite `resources/bluetooth-helpers.js` detects and triggers -the API to be loaded as needed. This file also contains several helper methods -that are used in the tests to set up fake Bluetooth devices and to assert that -specific Bluetooth events happened. +In this test suite `resources/bluetooth-test.js` detects and triggers +the API to be loaded as needed. This file also contains test helper methods, +such as for asserting that Bluetooth events are fired in a specific order. +The `resources/bluetooth-fake-devices.js` contains several helper methods that set +up fake Bluetooth devices. [Web Bluetooth specification]: https://WebBluetoothCG.github.io/web-bluetooth [Web Bluetooth Testing]: @@ -115,4 +116,4 @@ Bug tracker: [Blink>Bluetooth] * [Web Bluetooth Service README] -[Blink>Bluetooth]: https://bugs.chromium.org/p/chromium/issues/list?q=component%3ABlink%3EBluetooth&can=2 \ No newline at end of file +[Blink>Bluetooth]: https://bugs.chromium.org/p/chromium/issues/list?q=component%3ABlink%3EBluetooth&can=2 diff --git a/testing/web-platform/tests/bluetooth/adapter/adapter-absent-getAvailability.https.window.js b/testing/web-platform/tests/bluetooth/adapter/adapter-absent-getAvailability.https.window.js index a9f540ecd343..55f4a675da15 100644 --- a/testing/web-platform/tests/bluetooth/adapter/adapter-absent-getAvailability.https.window.js +++ b/testing/web-platform/tests/bluetooth/adapter/adapter-absent-getAvailability.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'getAvailability() resolves with false if the system does ' + 'not have an adapter.'; diff --git a/testing/web-platform/tests/bluetooth/adapter/adapter-added-getAvailability.https.window.js b/testing/web-platform/tests/bluetooth/adapter/adapter-added-getAvailability.https.window.js index 30c47201f072..f8e25b2ac2fc 100644 --- a/testing/web-platform/tests/bluetooth/adapter/adapter-added-getAvailability.https.window.js +++ b/testing/web-platform/tests/bluetooth/adapter/adapter-added-getAvailability.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'getAvailability() resolves with true after adapter is ' + 'inserted into a system with a platform that supports Bluetooth LE.'; diff --git a/testing/web-platform/tests/bluetooth/adapter/adapter-powered-off-getAvailability.https.window.js b/testing/web-platform/tests/bluetooth/adapter/adapter-powered-off-getAvailability.https.window.js index b760d4bc2728..1ffcd3bb096c 100644 --- a/testing/web-platform/tests/bluetooth/adapter/adapter-powered-off-getAvailability.https.window.js +++ b/testing/web-platform/tests/bluetooth/adapter/adapter-powered-off-getAvailability.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'getAvailability() resolves with true if the Bluetooth ' + 'radio is powered off, but the platform that supports Bluetooth LE.'; diff --git a/testing/web-platform/tests/bluetooth/adapter/adapter-powered-on-getAvailability.https.window.js b/testing/web-platform/tests/bluetooth/adapter/adapter-powered-on-getAvailability.https.window.js index f98a88eea9e1..84c7982d2146 100644 --- a/testing/web-platform/tests/bluetooth/adapter/adapter-powered-on-getAvailability.https.window.js +++ b/testing/web-platform/tests/bluetooth/adapter/adapter-powered-on-getAvailability.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'getAvailability() resolves with true if the Bluetooth ' + 'radio is powered on and the platform supports Bluetooth LE.'; diff --git a/testing/web-platform/tests/bluetooth/adapter/adapter-powered-on-off-on-getAvailability.https.window.js b/testing/web-platform/tests/bluetooth/adapter/adapter-powered-on-off-on-getAvailability.https.window.js index ac664a898126..c4ba9b5f3a9b 100644 --- a/testing/web-platform/tests/bluetooth/adapter/adapter-powered-on-off-on-getAvailability.https.window.js +++ b/testing/web-platform/tests/bluetooth/adapter/adapter-powered-on-off-on-getAvailability.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'getAvailability() is not affected by the powered state of ' + 'the adapter.'; diff --git a/testing/web-platform/tests/bluetooth/adapter/adapter-removed-getAvailability.https.window.js b/testing/web-platform/tests/bluetooth/adapter/adapter-removed-getAvailability.https.window.js index 00425aa56f25..ca0b51f47dc6 100644 --- a/testing/web-platform/tests/bluetooth/adapter/adapter-removed-getAvailability.https.window.js +++ b/testing/web-platform/tests/bluetooth/adapter/adapter-removed-getAvailability.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'getAvailability() resolves with false after the powered ' + 'on adapter is removed.'; diff --git a/testing/web-platform/tests/bluetooth/adapter/cross-origin-iframe-getAvailability.sub.https.window.js b/testing/web-platform/tests/bluetooth/adapter/cross-origin-iframe-getAvailability.sub.https.window.js index ce633c63f981..54abfbb5cefc 100644 --- a/testing/web-platform/tests/bluetooth/adapter/cross-origin-iframe-getAvailability.sub.https.window.js +++ b/testing/web-platform/tests/bluetooth/adapter/cross-origin-iframe-getAvailability.sub.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'getAvailability() resolves with false if called from a ' + 'unique origin'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/characteristicProperties.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/characteristicProperties.https.window.js index 5239accab979..f7a57a9c4b89 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/characteristicProperties.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/characteristicProperties.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'HeartRate device properties'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.window.js index eb91e972c4e5..7789f4b7c469 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js // Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py 'use strict'; const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-descriptor-get-same-object.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-descriptor-get-same-object.https.window.js index 4cff64bbdad1..01d4e8f30f82 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-descriptor-get-same-object.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-descriptor-get-same-object.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js // Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py 'use strict'; const test_desc = 'Calls to getDescriptor should return the same object.'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.window.js index f5d1761994ab..16b34dc09124 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js // Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py // TODO(https://crbug.com/672127) Use this test case to test the rest of // characteristic functions. diff --git a/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.window.js index 7405a8ee6e3a..b924f052d37d 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js // Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py 'use strict'; const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.window.js index 470f7043be31..ae8127c87b3c 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js // Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py 'use strict'; const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-descriptor-get-same-object.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-descriptor-get-same-object.https.window.js index 1dc58aea1552..11dd8bee80a7 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-descriptor-get-same-object.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-descriptor-get-same-object.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js // Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py 'use strict'; const test_desc = 'Calls to getDescriptors should return the same object.'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.window.js index 5ee7e0d24943..13e2e3751a88 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js // Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py // TODO(https://crbug.com/672127) Use this test case to test the rest of // characteristic functions. diff --git a/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.window.js index 24a2087e938f..99056cf209a7 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js // Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py // TODO(https://crbug.com/672127) Use this test case to test the rest of // characteristic functions. diff --git a/testing/web-platform/tests/bluetooth/characteristic/notifications/characteristic-is-removed.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/notifications/characteristic-is-removed.https.window.js index 2ab165d90445..9641ad71e970 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/notifications/characteristic-is-removed.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/notifications/characteristic-is-removed.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'Characteristic is removed. Reject with InvalidStateError.'; const expected = new DOMException( diff --git a/testing/web-platform/tests/bluetooth/characteristic/notifications/service-is-removed.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/notifications/service-is-removed.https.window.js index d2456934d83d..a5851fc47332 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/notifications/service-is-removed.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/notifications/service-is-removed.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'Service is removed. Reject with InvalidStateError.'; const expected = diff --git a/testing/web-platform/tests/bluetooth/characteristic/readValue/add-multiple-event-listeners.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/readValue/add-multiple-event-listeners.https.window.js index 13709ea941ed..0eeafd0b79ba 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/readValue/add-multiple-event-listeners.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/readValue/add-multiple-event-listeners.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'Add multiple event listeners then readValue().'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/readValue/characteristic-is-removed.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/readValue/characteristic-is-removed.https.window.js index 269f2cb4a1f0..e97b94f73664 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/readValue/characteristic-is-removed.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/readValue/characteristic-is-removed.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.'; const expected = new DOMException( diff --git a/testing/web-platform/tests/bluetooth/characteristic/readValue/event-is-fired.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/readValue/event-is-fired.https.window.js index 03b8f2b4cee8..52b70e7a080e 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/readValue/event-is-fired.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/readValue/event-is-fired.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'Reading a characteristic should fire an event.'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.window.js index 26efe8b306b4..e2599a16faec 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js // Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py 'use strict'; const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/readValue/read-succeeds.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/readValue/read-succeeds.https.window.js index 82be128f3124..e5ddfb81696c 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/readValue/read-succeeds.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/readValue/read-succeeds.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'A read request succeeds and returns the characteristic\'s ' + 'value.'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/readValue/read-updates-value.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/readValue/read-updates-value.https.window.js index 34da455ddff4..bb98aeb18f2d 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/readValue/read-updates-value.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/readValue/read-updates-value.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js const test_desc = 'Succesful read should update characteristic.value'; const EXPECTED_VALUE = [0, 1, 2]; diff --git a/testing/web-platform/tests/bluetooth/characteristic/readValue/service-is-removed.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/readValue/service-is-removed.https.window.js index 20dd4ba1c05e..1f699ca25eeb 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/readValue/service-is-removed.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/readValue/service-is-removed.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'Service gets removed. Reject with InvalidStateError.'; const expected = diff --git a/testing/web-platform/tests/bluetooth/characteristic/service-same-from-2-characteristics.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/service-same-from-2-characteristics.https.window.js index b34b3b9216ab..dafd755fd1d4 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/service-same-from-2-characteristics.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/service-same-from-2-characteristics.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'Same parent service returned from multiple characteristics.'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/service-same-object.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/service-same-object.https.window.js index b58902ae5195..01b3a25e35e4 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/service-same-object.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/service-same-object.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = '[SameObject] test for BluetoothRemoteGATTCharacteristic ' + 'service.'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.window.js index af27f933d8f1..62d0d15d10b5 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js // Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py 'use strict'; const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/writeValue/buffer-is-detached.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/writeValue/buffer-is-detached.https.window.js index d900632c4b50..5d707775e116 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/writeValue/buffer-is-detached.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/writeValue/buffer-is-detached.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'writeValue() fails when passed a detached buffer'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/writeValue/characteristic-is-removed.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/writeValue/characteristic-is-removed.https.window.js index c0f5a3e6509c..6e9da8802c7a 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/writeValue/characteristic-is-removed.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/writeValue/characteristic-is-removed.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.'; const expected = new DOMException( diff --git a/testing/web-platform/tests/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.window.js index d5ac10fc6114..2ceeabdb145d 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js // Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py 'use strict'; const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.'; diff --git a/testing/web-platform/tests/bluetooth/characteristic/writeValue/service-is-removed.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/writeValue/service-is-removed.https.window.js index e7a2837c389a..89c311247501 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/writeValue/service-is-removed.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/writeValue/service-is-removed.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'Service gets removed. Reject with InvalidStateError.'; const expected = diff --git a/testing/web-platform/tests/bluetooth/characteristic/writeValue/write-succeeds.https.window.js b/testing/web-platform/tests/bluetooth/characteristic/writeValue/write-succeeds.https.window.js index cdda9cec345b..d5c173c47aef 100644 --- a/testing/web-platform/tests/bluetooth/characteristic/writeValue/write-succeeds.https.window.js +++ b/testing/web-platform/tests/bluetooth/characteristic/writeValue/write-succeeds.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'A regular write request to a writable characteristic ' + 'should succeed.'; diff --git a/testing/web-platform/tests/bluetooth/descriptor/readValue/gen-service-is-removed.https.window.js b/testing/web-platform/tests/bluetooth/descriptor/readValue/gen-service-is-removed.https.window.js index aa95687094b5..2c46b99fd1de 100644 --- a/testing/web-platform/tests/bluetooth/descriptor/readValue/gen-service-is-removed.https.window.js +++ b/testing/web-platform/tests/bluetooth/descriptor/readValue/gen-service-is-removed.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js // Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py 'use strict'; const test_desc = 'Service gets removed. Reject with InvalidStateError.'; diff --git a/testing/web-platform/tests/bluetooth/descriptor/readValue/read-succeeds.https.window.js b/testing/web-platform/tests/bluetooth/descriptor/readValue/read-succeeds.https.window.js index fc1facaf58e3..d81db2f8c0dd 100644 --- a/testing/web-platform/tests/bluetooth/descriptor/readValue/read-succeeds.https.window.js +++ b/testing/web-platform/tests/bluetooth/descriptor/readValue/read-succeeds.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = `A read request succeeds and returns the descriptor's value.`; diff --git a/testing/web-platform/tests/bluetooth/descriptor/writeValue/buffer-is-detached.https.window.js b/testing/web-platform/tests/bluetooth/descriptor/writeValue/buffer-is-detached.https.window.js index 4fd3d661f7d9..49daf7cf86d1 100644 --- a/testing/web-platform/tests/bluetooth/descriptor/writeValue/buffer-is-detached.https.window.js +++ b/testing/web-platform/tests/bluetooth/descriptor/writeValue/buffer-is-detached.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'writeValue() fails when passed a detached buffer'; diff --git a/testing/web-platform/tests/bluetooth/descriptor/writeValue/gen-service-is-removed.https.window.js b/testing/web-platform/tests/bluetooth/descriptor/writeValue/gen-service-is-removed.https.window.js index a486819b55a1..c681bcee419b 100644 --- a/testing/web-platform/tests/bluetooth/descriptor/writeValue/gen-service-is-removed.https.window.js +++ b/testing/web-platform/tests/bluetooth/descriptor/writeValue/gen-service-is-removed.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js // Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py 'use strict'; const test_desc = 'Service gets removed. Reject with InvalidStateError.'; diff --git a/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/disconnected.https.window.js b/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/disconnected.https.window.js index dab54d5da296..43a11a88cbf6 100644 --- a/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/disconnected.https.window.js +++ b/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/disconnected.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'A device disconnecting while connected should fire the ' + 'gattserverdisconnected event.'; diff --git a/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/disconnected_gc.https.window.js b/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/disconnected_gc.https.window.js index a15cc943f4e1..a2c20ea4620a 100644 --- a/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/disconnected_gc.https.window.js +++ b/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/disconnected_gc.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'A device disconnecting after the BluetoothDevice object ' + 'has been GC\'ed should not access freed memory.'; diff --git a/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/one-event-per-disconnection.https.window.js b/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/one-event-per-disconnection.https.window.js index f5e45f99755d..ab273adbc88b 100644 --- a/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/one-event-per-disconnection.https.window.js +++ b/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/one-event-per-disconnection.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'If a site disconnects from a device while the platform is ' + 'disconnecting that device, only one gattserverdisconnected event should ' + diff --git a/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/reconnect-during-disconnected-event.https.window.js b/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/reconnect-during-disconnected-event.https.window.js index 8f264c7b0252..bdaf47c66198 100644 --- a/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/reconnect-during-disconnected-event.https.window.js +++ b/testing/web-platform/tests/bluetooth/device/gattserverdisconnected-event/reconnect-during-disconnected-event.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'A device that reconnects during the ' + 'gattserverdisconnected event should still receive ' + diff --git a/testing/web-platform/tests/bluetooth/getDevices/granted-devices-with-services.https.window.js b/testing/web-platform/tests/bluetooth/getDevices/granted-devices-with-services.https.window.js index 34b5912315ab..3228543617de 100644 --- a/testing/web-platform/tests/bluetooth/getDevices/granted-devices-with-services.https.window.js +++ b/testing/web-platform/tests/bluetooth/getDevices/granted-devices-with-services.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'getDevices() resolves with permitted devices that can be ' + 'GATT connected to.'; @@ -68,4 +69,4 @@ bluetooth_test(async () => { } catch (err) { assert_unreached(`${err.name}: ${err.message}`); } -}, test_desc); \ No newline at end of file +}, test_desc); diff --git a/testing/web-platform/tests/bluetooth/getDevices/no-granted-devices.https.window.js b/testing/web-platform/tests/bluetooth/getDevices/no-granted-devices.https.window.js index d945c3ff242c..304aa3820d5b 100644 --- a/testing/web-platform/tests/bluetooth/getDevices/no-granted-devices.https.window.js +++ b/testing/web-platform/tests/bluetooth/getDevices/no-granted-devices.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'getDevices() resolves with empty array if no device ' + 'permissions have been granted.'; @@ -11,4 +12,4 @@ bluetooth_test(async () => { assert_equals( 0, devices.length, 'getDevices() should resolve with an empty array'); -}, test_desc); \ No newline at end of file +}, test_desc); diff --git a/testing/web-platform/tests/bluetooth/getDevices/returns-same-bluetooth-device-object.https.window.js b/testing/web-platform/tests/bluetooth/getDevices/returns-same-bluetooth-device-object.https.window.js index 7c80703d5f5b..81c0f6a97e94 100644 --- a/testing/web-platform/tests/bluetooth/getDevices/returns-same-bluetooth-device-object.https.window.js +++ b/testing/web-platform/tests/bluetooth/getDevices/returns-same-bluetooth-device-object.https.window.js @@ -1,6 +1,7 @@ // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/bluetooth/resources/bluetooth-helpers.js +// META: script=/bluetooth/resources/bluetooth-test.js +// META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'multiple calls to getDevices() resolves with the same' + 'BluetoothDevice objects for each granted Bluetooth device.'; @@ -19,4 +20,4 @@ bluetooth_test(async () => { firstDevices[0], secondDevices[0], 'getDevices() should produce the same BluetoothDevice objects for a ' + 'given Bluetooth device.'); -}, test_desc); \ No newline at end of file +}, test_desc); diff --git a/testing/web-platform/tests/bluetooth/idl/idl-BluetoothDevice.https.html b/testing/web-platform/tests/bluetooth/idl/idl-BluetoothDevice.https.html index 6030d4e5acdc..ef2863dc2740 100644 --- a/testing/web-platform/tests/bluetooth/idl/idl-BluetoothDevice.https.html +++ b/testing/web-platform/tests/bluetooth/idl/idl-BluetoothDevice.https.html @@ -3,7 +3,8 @@ - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + +