gecko-dev/testing/web-platform/tests/bluetooth
Philip Jägenstedt 5aa25bff58 Bug 1476293 [wpt PR 12024] - Add spec links to META.yml, a=testonly
Automatic update from web-platform-testsMerge pull request #12024 from web-platform-tests/meta-specs

Add spec links to META.yml
--

wpt-commits: eeded53153beba20a9c2c8bf35a02ae1d48103cd
wpt-pr: 12024
2018-07-29 18:49:42 +01:00
..
characteristic Bug 1452101 [wpt PR 9962] - Revert "bluetooth: Use DeviceUUID in FakeBluetooth", a=testonly 2018-04-15 08:29:45 +01:00
descriptor Bug 1452101 [wpt PR 9962] - Revert "bluetooth: Use DeviceUUID in FakeBluetooth", a=testonly 2018-04-15 08:29:45 +01:00
device/gattserverdisconnected-event Bug 1450351 [wpt PR 10257] - bluetooth: web: test: Use AllResponsesConsumed, a=testonly 2018-04-15 09:28:10 +01:00
idl Bug 1474797 [wpt PR 11901] - Update the web-bluetooth IDL file, a=testonly 2018-07-25 10:28:18 +03:00
requestDevice Bug 1447862 [wpt PR 10130] - Make BlueTooth/USB requestDevice non-consuming., a=testonly 2018-04-15 09:37:06 +01:00
resources Bug 1452302 [wpt PR 10319] - bluetooth: web: test: Update char disconnect tests, a=testonly 2018-04-15 09:31:41 +01:00
script-tests Bug 1450351 [wpt PR 10257] - bluetooth: web: test: Use AllResponsesConsumed, a=testonly 2018-04-15 09:28:10 +01:00
server Bug 1450351 [wpt PR 10257] - bluetooth: web: test: Use AllResponsesConsumed, a=testonly 2018-04-15 09:28:10 +01:00
service Bug 1452101 [wpt PR 9962] - Revert "bluetooth: Use DeviceUUID in FakeBluetooth", a=testonly 2018-04-15 08:29:45 +01:00
generate_test.py
generate.py
META.yml Bug 1476293 [wpt PR 12024] - Add spec links to META.yml, a=testonly 2018-07-29 18:49:42 +01:00
README.md

Web Bluetooth Testing

Web Bluetooth testing relies on the Web Bluetooth Testing API which must be provided by browsers under test.

In this test suite resources/bluetooth-helpers.js detects and triggers the API to be loaded as needed.

The Chromium implementation is provided by ../resources/chromium/web-bluetooth-test.js.

The Chromium implementation is not included in stable Chrome builds since it would add too much to the binary size. On Chromium infrastructure, it is run using the content_shell executable.

In the future, Chromium src/device/bluetooth may be refactored into a Mojo service. At this point, it would be possible to add the necessary testing hooks into stable Chrome without substantially increasing the binary size, similar to WebUSB.

These bluetooth tests are upstreamed here because other browsers can reuse them by implementing the Web Bluetooth Testing API, even if only on their internal infrastructure.

Generated gen-* files from generator.py

generator.py builds gen-*.html tests using templates in script-tests/*/*.js.

The subdirectory structure in bluetooth/script-test/* is recreated into bluetooth/*. The generator expands each CALL function from templates into new leaf directories and files.

Example:

script-tests/server/get-same-object.js contains:

gattServer.CALLS([
        getPrimaryService('heart_rate')|
        getPrimaryServices()|
        getPrimaryServices('heart_rate')[UUID]]),

Generating:

server/getPrimaryService/gen-get-same-object.html
server/getPrimaryServices/gen-get-same-object.html
server/getPrimaryServices/gen-get-same-object-with-uuid.html

Usage:

$ python generate.py

More details documented in generate.py.