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

Unified Diff: third_party/WebKit/LayoutTests/bluetooth/characteristicvaluechanged.html

Issue 1858103004: bluetooth: Separate notification tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-mojo-notifications
Patch Set: Merge Created 4 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/bluetooth/notifications/add-listener-after-promise.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/bluetooth/characteristicvaluechanged.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/characteristicvaluechanged.html b/third_party/WebKit/LayoutTests/bluetooth/characteristicvaluechanged.html
index 20a23c1e596d26ed0ff67ef946361355e58c66d6..75fe8c9d5aa9a9ed33997e1c098b8621515393a6 100644
--- a/third_party/WebKit/LayoutTests/bluetooth/characteristicvaluechanged.html
+++ b/third_party/WebKit/LayoutTests/bluetooth/characteristicvaluechanged.html
@@ -64,67 +64,4 @@ promise_test(() => {
});
}, 'Add multiple event listeners then readValue().');
}
-
-promise_test(() => {
- let char;
- return setBluetoothFakeAdapter('HeartRateAdapter')
- .then(() => requestDeviceWithKeyDown({
- filters: [{services: ['heart_rate']}]}))
- .then(device => device.gatt.connect())
- .then(gattServer => gattServer.getPrimaryService('heart_rate'))
- .then(service => service.getCharacteristic('heart_rate_measurement'))
- .then(characteristic => {
- char = characteristic;
- return assert_event_fires_after_promise(characteristic,
- 'startNotifications',
- 'characteristicvaluechanged');
- })
- .then(() => char.stopNotifications())
- .then(() => assert_no_events(char, 'characteristicvaluechanged'));
-}, 'Starting notifications should fire an event.');
-
-promise_test(() => {
- let char;
- return setBluetoothFakeAdapter('HeartRateAdapter')
- .then(() => requestDeviceWithKeyDown({
- filters: [{services: ['heart_rate']}]}))
- .then(device => device.gatt.connect())
- .then(gattServer => gattServer.getPrimaryService('heart_rate'))
- .then(service => service.getCharacteristic('heart_rate_measurement'))
- .then(characteristic => {
- char = characteristic;
- return characteristic.startNotifications()
- .then(() => new Promise(resolve => {
- let event_listener = e => {
- characteristic.removeEventListener('characteristicvaluechanged',
- event_listener);
- resolve();
- };
- characteristic.addEventListener('characteristicvaluechanged',
- event_listener);
- }));
- })
- .then(() => char.stopNotifications())
- .then(() => assert_no_events(char, 'characteristicvaluechanged'));
-}, 'Registering after the promise resolves shouldn\'t result in events ' +
- 'getting dropped.');
-
-promise_test(() => {
- let char;
- return setBluetoothFakeAdapter('HeartRateAdapter')
- .then(() => requestDeviceWithKeyDown({
- filters: [{services: ['heart_rate']}]}))
- .then(device => device.gatt.connect())
- .then(gattServer => gattServer.getPrimaryService('heart_rate'))
- .then(service => service.getCharacteristic('heart_rate_measurement'))
- .then(characteristic => {
- char = characteristic;
- return assert_event_fires_after_promise(characteristic,
- 'startNotifications',
- 'characteristicvaluechanged',
- 3 /* add 3 listeners */);
- })
- .then(() => char.stopNotifications())
- .then(() => assert_no_events(char, 'characteristicvaluechanged'));
-}, 'Add multiple event listeners then startNotifications().');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/bluetooth/notifications/add-listener-after-promise.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698