mirror of
https://github.com/servo/servo.git
synced 2025-06-25 09:34:32 +01:00
Fixed some typos in stopNotifications test.
This commit is contained in:
parent
0fe94a6724
commit
78084c2213
4 changed files with 10 additions and 5 deletions
|
@ -0,0 +1,5 @@
|
||||||
|
[disconnect-called-before.html]
|
||||||
|
type: testharness
|
||||||
|
[disconnect() called before stopNotifications. Reject with InvalidStateError.]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[disconnect-called-during.html]
|
[disconnect-called-during.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[disconnect() called during stopNotifications. Reject with NetworkError.]
|
[disconnect() called during stopNotifications. Reject with InvalidStateError.]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@ promise_test(t => {
|
||||||
.then(characteristic => characteristic.startNotifications())
|
.then(characteristic => characteristic.startNotifications())
|
||||||
.then(characteristic => {
|
.then(characteristic => {
|
||||||
gattServer.disconnect();
|
gattServer.disconnect();
|
||||||
return promise_rejects(t, 'NetworkError', characteristic.startNotifications());
|
return promise_rejects(t, 'InvalidStateError', characteristic.stopNotifications());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}, 'disconnect() called before stopNotifications. Reject with NetworkError.');
|
}, 'disconnect() called before stopNotifications. Reject with InvalidStateError.');
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -16,10 +16,10 @@ promise_test(t => {
|
||||||
.then(service => service.getCharacteristic(heart_rate_measurement.name))
|
.then(service => service.getCharacteristic(heart_rate_measurement.name))
|
||||||
.then(characteristic => characteristic.startNotifications())
|
.then(characteristic => characteristic.startNotifications())
|
||||||
.then(characteristic => {
|
.then(characteristic => {
|
||||||
let promise = promise_rejects(t, 'NetworkError', characteristic.startNotifications());
|
let promise = promise_rejects(t, 'InvalidStateError', characteristic.stopNotifications());
|
||||||
gattServer.disconnect();
|
gattServer.disconnect();
|
||||||
return promise;
|
return promise;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}, 'disconnect() called during stopNotifications. Reject with NetworkError.');
|
}, 'disconnect() called during stopNotifications. Reject with InvalidStateError.');
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue