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

Unified Diff: LayoutTests/bluetooth/connectGATT.html

Issue 1182973002: Implement the Blink side of RequestDeviceOptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Prepare readValue.html for a mock data change Created 5 years, 6 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: LayoutTests/bluetooth/connectGATT.html
diff --git a/LayoutTests/bluetooth/connectGATT.html b/LayoutTests/bluetooth/connectGATT.html
index 095e5113b83aa95479c98f4970014e57bfccab94..eb30d119c2293b95f5a797cb33122b4a09f4a1bc 100644
--- a/LayoutTests/bluetooth/connectGATT.html
+++ b/LayoutTests/bluetooth/connectGATT.html
@@ -8,7 +8,9 @@ test(function(t) { assert_exists(window, "testRunner"); t.done(); },
sequential_promise_test(function() {
testRunner.setBluetoothMockDataSet('ConnectableDeviceAdapter');
- return navigator.bluetooth.requestDevice().then(function(device) {
+ return navigator.bluetooth.requestDevice({
+ filters: [{services: [genericAccessServiceUuid]}]
+ }).then(function(device) {
testRunner.setBluetoothMockDataSet('EmptyAdapter');
return device.connectGATT().then(function() {
assert_unreached('Should return error if device not in adapter.');
@@ -20,7 +22,9 @@ sequential_promise_test(function() {
sequential_promise_test(function() {
testRunner.setBluetoothMockDataSet('UnconnectableDeviceAdapter');
- return navigator.bluetooth.requestDevice().then(function(device) {
+ return navigator.bluetooth.requestDevice({
+ filters: [{services: [genericAccessServiceUuid]}]
+ }).then(function(device) {
return device.connectGATT().then(function() {
assert_unreached('Should return error since device failed to connect.');
}, function(e) {
@@ -31,7 +35,9 @@ sequential_promise_test(function() {
sequential_promise_test(function() {
testRunner.setBluetoothMockDataSet('ConnectableDeviceAdapter');
- return navigator.bluetooth.requestDevice().then(function(device) {
+ return navigator.bluetooth.requestDevice({
+ filters: [{services: [genericAccessServiceUuid]}]
+ }).then(function(device) {
return device.connectGATT();
}).then(function(gattConnection) {
assert_true(gattConnection.connected);

Powered by Google App Engine
This is Rietveld 408576698