Index: third_party/WebKit/LayoutTests/resources/bluetooth/bluetooth-helpers.js |
diff --git a/third_party/WebKit/LayoutTests/resources/bluetooth/bluetooth-helpers.js b/third_party/WebKit/LayoutTests/resources/bluetooth/bluetooth-helpers.js |
index d4ace28a9bbbac59fa35860b2b95a2b445fe885c..08901e571c71394ea2dcdd3f8f1e8e23283ad9cb 100644 |
--- a/third_party/WebKit/LayoutTests/resources/bluetooth/bluetooth-helpers.js |
+++ b/third_party/WebKit/LayoutTests/resources/bluetooth/bluetooth-helpers.js |
@@ -422,3 +422,11 @@ function generateRequestDeviceArgsWithServices(services = ['heart_rate']) { |
optionalServices: ['heart_rate'] |
}]; |
} |
+ |
+function setUpPreconnectedDevice({address = '00:00:00:00:00:00', name}) { |
+ return navigator.bluetooth.test.simulateCentral({state: 'powered-on'}) |
+ .then(fake_central => fake_central.simulatePreconnectedPeripheral({ |
+ address: address, |
+ name: name |
+ })); |
+} |