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

Unified Diff: third_party/WebKit/LayoutTests/bluetooth/requestDevice/stop-discovery-by-adapter-discovering-changed.html

Issue 2735773002: work in progress
Patch Set: Created 3 years, 9 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 | « content/shell/renderer/layout_test/blink_test_runner.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/bluetooth/requestDevice/stop-discovery-by-adapter-discovering-changed.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/requestDevice/stop-discovery-by-adapter-discovering-changed.html b/third_party/WebKit/LayoutTests/bluetooth/requestDevice/stop-discovery-by-adapter-discovering-changed.html
new file mode 100644
index 0000000000000000000000000000000000000000..c4d6dfec8b81473c79f8cfa9955b6e0b38214643
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/requestDevice/stop-discovery-by-adapter-discovering-changed.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
+<script>
+'use strict';
+promise_test(() => {
+ testRunner.setBluetoothManualChooser(true);
+ let requestDevicePromise =
+ setBluetoothFakeAdapter('SecondDiscoveryFindsHeartRateAdapter')
+ .then(() => requestDeviceWithKeyDown({
+ filters: [{services: ['heart_rate']}]}));
+ return getBluetoothManualChooserEvents(2)
+ .then(events => {
+ assert_array_equals(events,
+ ['chooser-opened(file://)',
+ 'discovering'],
+ events);
+ testRunner.sendBluetoothManualChooserEvent('adapter-discovering-changed', '');
+ return getBluetoothManualChooserEvents(1);
+ }).then(events => {
+ assert_equals(events[0], 'discovery-idle');
+ return assert_promise_rejects_with_message(
+ requestDevicePromise,
+ new DOMException('User cancelled the requestDevice() chooser.',
+ 'NotFoundError'),
+ 'The adapter failed to start a discovery session.');
+ });
+}, 'Discovery session fails to start.');
+</script>
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698