Fixed some typos in stopNotifications test.

This commit is contained in:
Valentin Fokin 2016-12-08 14:14:08 +01:00
parent 0fe94a6724
commit 78084c2213
4 changed files with 10 additions and 5 deletions

View file

@ -0,0 +1,5 @@
[disconnect-called-before.html]
type: testharness
[disconnect() called before stopNotifications. Reject with InvalidStateError.]
expected: FAIL

View file

@ -1,5 +1,5 @@
[disconnect-called-during.html]
type: testharness
[disconnect() called during stopNotifications. Reject with NetworkError.]
[disconnect() called during stopNotifications. Reject with InvalidStateError.]
expected: FAIL

View file

@ -17,8 +17,8 @@ promise_test(t => {
.then(characteristic => characteristic.startNotifications())
.then(characteristic => {
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>

View file

@ -16,10 +16,10 @@ promise_test(t => {
.then(service => service.getCharacteristic(heart_rate_measurement.name))
.then(characteristic => characteristic.startNotifications())
.then(characteristic => {
let promise = promise_rejects(t, 'NetworkError', characteristic.startNotifications());
let promise = promise_rejects(t, 'InvalidStateError', characteristic.stopNotifications());
gattServer.disconnect();
return promise;
});
});
}, 'disconnect() called during stopNotifications. Reject with NetworkError.');
}, 'disconnect() called during stopNotifications. Reject with InvalidStateError.');
</script>