Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(397)

Unified Diff: third_party/WebKit/LayoutTests/resources/bluetooth/bluetooth-helpers.js

Issue 2858803003: bluetooth: Implement simulatePreconnectedPeripheral. (Closed)
Patch Set: small cleanup Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..bc3eeda0a5713dbc1eea686d18d5b36b9729f3f8 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 setUpSystemConnectedDevice({address = '00:00:00:00:00:00', name}) {
+ return navigator.bluetooth.test.simulateCentral({state: 'powered-on'})
+ .then(fake_central => fake_central.simulateSystemConnectedPeripheral({
+ address: address,
+ name: name
+ }));
+}

Powered by Google App Engine
This is Rietveld 408576698