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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/script-tests/server/garbage-collection-ran-during-success.js

Issue 2652163002: bluetooth: Improve GATT disconnected error message. (Closed)
Patch Set: Merge TOT Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 'use strict'; 1 'use strict';
2 promise_test(() => { 2 promise_test(() => {
3 let promise; 3 let promise;
4 return setBluetoothFakeAdapter('DisconnectingHealthThermometerAdapter') 4 return setBluetoothFakeAdapter('DisconnectingHealthThermometerAdapter')
5 .then(() => requestDeviceWithKeyDown({ 5 .then(
6 filters: [{services: ['health_thermometer']}]})) 6 () => requestDeviceWithKeyDown(
7 .then(device => device.gatt.connect()) 7 {filters: [{services: ['health_thermometer']}]}))
8 .then(gattServer => { 8 .then(device => device.gatt.connect())
9 promise = assert_promise_rejects_with_message( 9 .then(gattServer => {
10 gattServer.CALLS([ 10 promise = assert_promise_rejects_with_message(
11 getPrimaryService('health_thermometer')| 11 gattServer.CALLS(
12 getPrimaryServices()| 12 [getPrimaryService('health_thermometer') |
13 getPrimaryServices('health_thermometer')[UUID]]), 13 getPrimaryServices() |
14 new DOMException( 14 getPrimaryServices('health_thermometer')[UUID]]),
15 'GATT Server disconnected while retrieving services.', 15 new DOMException(
16 'NetworkError')); 16 'GATT Server is disconnected. ' +
17 gattServer.disconnect(); 17 'Cannot retrieve services. ' +
18 }) 18 '(Re)connect first with `device.gatt.connect`.',
19 .then(runGarbageCollection) 19 'NetworkError'));
20 .then(() => promise); 20 gattServer.disconnect();
21 })
22 .then(runGarbageCollection)
23 .then(() => promise);
21 }, 'Garbage Collection ran during a FUNCTION_NAME call that succeeds. ' + 24 }, 'Garbage Collection ran during a FUNCTION_NAME call that succeeds. ' +
22 'Should not crash.'); 25 'Should not crash.');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698