Index: third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryService/gen-no-permission-for-any-service.html |
diff --git a/third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryService/gen-no-permission-for-any-service.html b/third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryService/gen-no-permission-for-any-service.html |
index c04a98f458745bdb33fd66f6773788c393671252..d02d25df5f72e694c975e1cac4e995a16adb855a 100644 |
--- a/third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryService/gen-no-permission-for-any-service.html |
+++ b/third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryService/gen-no-permission-for-any-service.html |
@@ -8,18 +8,14 @@ |
<script> |
'use strict'; |
promise_test(() => { |
- return setBluetoothFakeAdapter('HeartRateAdapter') |
- .then(() => requestDeviceWithKeyDown({ |
- filters: [{name: 'Heart Rate Device'}]})) |
- .then(device => device.gatt.connect()) |
- .then(gattServer => assert_promise_rejects_with_message( |
- gattServer.getPrimaryService('heart_rate'), |
+ return getHealthThermometerDevice({acceptAllDevices: true}) |
+ .then(([device]) => assert_promise_rejects_with_message( |
+ device.gatt.getPrimaryService('heart_rate'), |
new DOMException('Origin is not allowed to access any service. Tip: ' + |
'Add the service UUID to \'optionalServices\' in ' + |
'requestDevice() options. https://goo.gl/HxfxSQ', |
'SecurityError'))); |
}, 'Request for present service without permission to access any service. ' + |
'Reject with SecurityError.'); |
-</script> |
</script> |