Name Description Size
adapter
characteristic
descriptor
device
generate.py Generator script for Web Bluetooth LayoutTests. For each script-tests/X.js creates the following test files depending on the contents of X.js - getPrimaryService/X.https.window.js - getPrimaryServices/X.https.window.js - getPrimaryServices/X-with-uuid.https.window.js script-tests/X.js files should contain "CALLS([variation1 | variation2 | ...])" tokens that indicate what files to generate. Each variation in CALLS([...]) should corresponds to a js function call and its arguments. Additionally a variation can end in [UUID] to indicate that the generated file's name should have the -with-uuid suffix. The PREVIOUS_CALL token will be replaced with the function that replaced CALLS. The FUNCTION_NAME token will be replaced with the name of the function that replaced CALLS. For example, for the following template file: // script-tests/example.js promise_test(() => { return navigator.bluetooth.requestDevice(...) .then(device => device.gatt.CALLS([ getPrimaryService('heart_rate')| getPrimaryServices('heart_rate')[UUID]])) .then(device => device.gatt.PREVIOUS_CALL); }, 'example test for FUNCTION_NAME'); this script will generate: // getPrimaryService/example.https.window.js promise_test(() => { return navigator.bluetooth.requestDevice(...) .then(device => device.gatt.getPrimaryService('heart_rate')) .then(device => device.gatt.getPrimaryService('heart_rate')); }, 'example test for getPrimaryService'); // getPrimaryServices/example-with-uuid.https.window.js promise_test(() => { return navigator.bluetooth.requestDevice(...) .then(device => device.gatt.getPrimaryServices('heart_rate')) .then(device => device.gatt.getPrimaryServices('heart_rate')); }, 'example test for getPrimaryServices'); Run $ python //third_party/WebKit/LayoutTests/bluetooth/generate.py and commit the generated files. 7167
generate_test.py Test that the set of gen-* files is the same as the generated files. 1912
getAvailability
getDevices
idl
META.yml 113
README.md # Web Bluetooth API Tests 4348
requestDevice
requestLEScan
resources
script-tests
server
service
WEB_FEATURES.yml 46