| OLD | NEW |
| 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(t) { assert_exists(window, "testRunner"); t.done(); }, | 6 test(function(t) { assert_true(window.testRunner instanceof Object); t.done(); }
, |
| 7 "window.testRunner is required for the following tests."); | 7 "window.testRunner is required for the following tests."); |
| 8 | 8 |
| 9 var generic_access = "00001800-0000-1000-8000-00805f9b34fb"; | 9 var generic_access = "00001800-0000-1000-8000-00805f9b34fb"; |
| 10 var heart_rate = "0000180D-0000-1000-8000-00805f9b34fb"; | 10 var heart_rate = "0000180D-0000-1000-8000-00805f9b34fb"; |
| 11 | 11 |
| 12 sequential_promise_test(function() { | 12 sequential_promise_test(function() { |
| 13 testRunner.setBluetoothMockDataSet('ConnectableDeviceAdapter'); | 13 testRunner.setBluetoothMockDataSet('ConnectableDeviceAdapter'); |
| 14 return navigator.bluetooth.requestDevice({ | 14 return navigator.bluetooth.requestDevice({ |
| 15 filters: [{services: [generic_access]}] | 15 filters: [{services: [generic_access]}] |
| 16 }).then(function(device) { | 16 }).then(function(device) { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 }).then(function(services) { | 68 }).then(function(services) { |
| 69 // getPrimaryService should return the same object if it was created | 69 // getPrimaryService should return the same object if it was created |
| 70 // earlier. https://crbug.com/495270 | 70 // earlier. https://crbug.com/495270 |
| 71 // TODO(ortuno): Change to assert_equals. | 71 // TODO(ortuno): Change to assert_equals. |
| 72 assert_not_equals(services[0], services[1], | 72 assert_not_equals(services[0], services[1], |
| 73 "Should return the same service as the first call."); | 73 "Should return the same service as the first call."); |
| 74 }); | 74 }); |
| 75 }, 'Calls to get the same service should return the same object.'); | 75 }, 'Calls to get the same service should return the same object.'); |
| 76 | 76 |
| 77 </script> | 77 </script> |
| OLD | NEW |