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

Side by Side Diff: LayoutTests/bluetooth/getPrimaryService.html

Issue 1197733009: Prepare LayoutTests for lazy loading testRunner and internals. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
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(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
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>
OLDNEW
« no previous file with comments | « LayoutTests/bluetooth/getCharacteristic.html ('k') | LayoutTests/bluetooth/idl-BluetoothDevice.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698