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

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

Issue 1174843002: Add tests for RequestDeviceOptions and clean up. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Comment how the ScanFilterCheckingAdapter test works Created 5 years, 6 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <script src="bluetooth-helpers.js"></script> 4 <script src="bluetooth-helpers.js"></script>
5 <script> 5 <script>
6 test(function() { 6 test(function() {
7 assert_throws(null, function() { new BluetoothDevice(); }, 7 assert_throws(null, function() { new BluetoothDevice(); },
8 'the constructor should not be callable with "new"'); 8 'the constructor should not be callable with "new"');
9 assert_throws(null, function() { BluetoothDevice(); }, 9 assert_throws(null, function() { BluetoothDevice(); },
10 'the constructor should not be callable'); 10 'the constructor should not be callable');
(...skipping 14 matching lines...) Expand all
25 device.name = "overwritten"; 25 device.name = "overwritten";
26 device.deviceClass = "overwritten"; 26 device.deviceClass = "overwritten";
27 device.vendorIDSource = "overwritten"; 27 device.vendorIDSource = "overwritten";
28 device.vendorID = "overwritten"; 28 device.vendorID = "overwritten";
29 device.productID = "overwritten"; 29 device.productID = "overwritten";
30 device.productVersion = "overwritten"; 30 device.productVersion = "overwritten";
31 device.paired = "overwritten"; 31 device.paired = "overwritten";
32 device.uuids = "overwritten"; 32 device.uuids = "overwritten";
33 33
34 assert_equals(device.instanceID, "Empty Mock Device instanceID"); 34 assert_equals(device.instanceID, "Empty Mock Device instanceID");
35 assert_equals(device.name.slice(0, 17), "Empty Mock Device"); 35 assert_equals(device.name, "Empty Mock Device");
36 assert_equals(device.deviceClass, 0x1F00); 36 assert_equals(device.deviceClass, 0x1F00);
37 assert_equals(device.vendorIDSource, "bluetooth"); 37 assert_equals(device.vendorIDSource, "bluetooth");
38 assert_equals(device.vendorID, 0xFFFF); 38 assert_equals(device.vendorID, 0xFFFF);
39 assert_equals(device.productID, 1); 39 assert_equals(device.productID, 1);
40 assert_equals(device.productVersion, 2); 40 assert_equals(device.productVersion, 2);
41 assert_equals(device.paired, true); 41 assert_equals(device.paired, true);
42 assert_equals(device.uuids[0], genericAccessServiceUuid); 42 assert_equals(device.uuids[0], genericAccessServiceUuid);
43 assert_equals(device.uuids[1], genericAttributeServiceUuid); 43 assert_equals(device.uuids[1], genericAttributeServiceUuid);
44 }); 44 });
45 }, 'BluetoothDevice attributes.'); 45 }, 'BluetoothDevice attributes.');
46 </script> 46 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/bluetooth/readValue.html » ('j') | LayoutTests/bluetooth/requestDevice.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698