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

Unified Diff: LayoutTests/bluetooth/requestDevice.html

Issue 1293593003: Add errors for various chooser failure modes, and remove assertions that are about to change. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Sync Created 5 years, 4 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 | LayoutTests/bluetooth/resources/bluetooth-helpers.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/bluetooth/requestDevice.html
diff --git a/LayoutTests/bluetooth/requestDevice.html b/LayoutTests/bluetooth/requestDevice.html
index 2954fd7763250033d355bd63538d1f6d3b7160a0..08236bc2b68df842b8d51561e67c29ab4f97690e 100644
--- a/LayoutTests/bluetooth/requestDevice.html
+++ b/LayoutTests/bluetooth/requestDevice.html
@@ -21,11 +21,14 @@ promise_test(() => {
new TypeError());
}, 'RequestDeviceOptions requires a |filters| member.');
+// TODO(jyasskin): Add a test that the chooser is informed of a failed discovery
+// session.
promise_test(() => {
testRunner.setBluetoothMockDataSet('FailStartDiscoveryAdapter');
return assert_promise_rejects_with_message(
requestDeviceWithKeyDown({filters: [{services: ['generic_access']}]}),
- {name: 'NotFoundError', message: 'Couldn\'t start discovery session.'},
+ // TODO(jyasskin): Uncomment the message when it's changed on the Chrome side.
+ {name: 'NotFoundError', /*message: 'User cancelled the requestDevice() chooser.'*/},
'The adapter failed to start a discovery session.');
}, 'Discovery session fails to start.');
@@ -37,19 +40,25 @@ promise_test(() => {
'Bluetooth adapter is not present.');
}, 'Reject with NotFoundError if the adapter is not present.');
+// TODO(jyasskin): Add a test that the chooser is informed of a disabled
+// Bluetooth adapter.
promise_test(() => {
testRunner.setBluetoothMockDataSet('NotPoweredAdapter');
return assert_promise_rejects_with_message(
requestDeviceWithKeyDown({filters: [{services: ['generic_access']}]}),
- {name: 'NotFoundError', message: 'Bluetooth adapter is off.'},
+ // TODO(jyasskin): Uncomment the message when it's changed on the Chrome side.
+ {name: 'NotFoundError', /*message: 'User cancelled the requestDevice() chooser.'*/},
'Bluetooth adapter is not powered.');
}, 'Reject with NotFoundError if the adapter is off.');
+// TODO(jyasskin): Add a test that the chooser gets a full list of found
+// devices.
promise_test(() => {
testRunner.setBluetoothMockDataSet('EmptyAdapter');
return assert_promise_rejects_with_message(
requestDeviceWithKeyDown({filters: [{services: ['generic_access']}]}),
- {name: 'NotFoundError', message: 'No Bluetooth devices in range.'},
+ // TODO(jyasskin): Uncomment the message when it's changed on the Chrome side.
+ {name: 'NotFoundError', /*message: 'User cancelled the requestDevice() chooser.'*/},
'No Bluetooth devices in range.');
}, 'Reject with NotFoundError if there are no devices around.');
« no previous file with comments | « no previous file | LayoutTests/bluetooth/resources/bluetooth-helpers.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698