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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/idl-BluetoothDevice.html

Issue 2544513004: Fix WebBluetooth generator to distinguish between different methods. (Closed)
Patch Set: Remove TL;DR in README Created 4 years 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/testharnessreport.js"></script>
4 <script src="../resources/bluetooth/bluetooth-helpers.js"></script>
5 <script>
6 test(() => {
7 assert_throws(null, () => new BluetoothDevice(),
8 'the constructor should not be callable with "new"');
9 assert_throws(null, () => BluetoothDevice(),
10 'the constructor should not be callable');
11 }, 'BluetoothDevice IDL test');
12
13 test(t => { assert_true(window.testRunner instanceof Object); t.done(); },
14 'window.testRunner is required for the following tests.');
15
16 promise_test(() => {
17 return setBluetoothFakeAdapter('GlucoseHeartRateAdapter')
18 .then(() => requestDeviceWithKeyDown({
19 filters: [{services: ['heart_rate']}]}))
20 .then(device => {
21 assert_equals(device.constructor.name, 'BluetoothDevice');
22
23 // Attempt (and fail) to overwrite all members, verifying they are
24 // readonly.
25 var old_device_id = device.id;
26 device.id = 'overwritten';
27 device.name = 'overwritten';
28 assert_equals(device.id, old_device_id);
29 assert_equals(device.name, 'Heart Rate Device');
30 });
31 }, 'BluetoothDevice attributes.');
32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698