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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/requestDevice-denied-permission.html

Issue 1706503002: Add enterprise policy to turn off Bluetooth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Sync Created 4 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharness-helpers.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="resources/bluetooth-helpers.js"></script>
6 <script>
7 'use strict';
8
9 test(t => { assert_true(window.testRunner instanceof Object); t.done(); },
10 'window.testRunner is required for the following tests.');
11
12 promise_test(() => {
13 testRunner.setPermission("bluetooth-guard", "denied", location.origin, locatio n.origin);
14 testRunner.setBluetoothMockDataSet('HeartRateAdapter');
15
16 return assert_promise_rejects_with_message(
17 requestDeviceWithKeyDown({filters: [{services: ['heart_rate']}]}),
18 new DOMException('User or their enterprise policy has disabled Web Bluetooth globally.',
19 'NotFoundError'),
20 '');
21 }, 'Globally denying permission works.');
22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698