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

Side by Side Diff: LayoutTests/bluetooth/connectGATT.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
« no previous file with comments | « no previous file | LayoutTests/bluetooth/getCharacteristic.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 sequential_promise_test(function() { 9 sequential_promise_test(function() {
10 testRunner.setBluetoothMockDataSet('ConnectableDeviceAdapter'); 10 testRunner.setBluetoothMockDataSet('ConnectableDeviceAdapter');
11 return navigator.bluetooth.requestDevice({ 11 return navigator.bluetooth.requestDevice({
12 filters: [{services: [genericAccessServiceUuid]}] 12 filters: [{services: [genericAccessServiceUuid]}]
13 }).then(function(device) { 13 }).then(function(device) {
14 testRunner.setBluetoothMockDataSet('EmptyAdapter'); 14 testRunner.setBluetoothMockDataSet('EmptyAdapter');
15 return device.connectGATT().then(function() { 15 return device.connectGATT().then(function() {
16 assert_unreached('Should return error if device not in adapter.'); 16 assert_unreached('Should return error if device not in adapter.');
(...skipping 22 matching lines...) Expand all
39 testRunner.setBluetoothMockDataSet('ConnectableDeviceAdapter'); 39 testRunner.setBluetoothMockDataSet('ConnectableDeviceAdapter');
40 return navigator.bluetooth.requestDevice({ 40 return navigator.bluetooth.requestDevice({
41 filters: [{services: [genericAccessServiceUuid]}] 41 filters: [{services: [genericAccessServiceUuid]}]
42 }).then(function(device) { 42 }).then(function(device) {
43 return device.connectGATT(); 43 return device.connectGATT();
44 }).then(function(gattConnection) { 44 }).then(function(gattConnection) {
45 assert_true(gattConnection.connected); 45 assert_true(gattConnection.connected);
46 }); 46 });
47 }, 'Device will connect'); 47 }, 'Device will connect');
48 </script> 48 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/bluetooth/getCharacteristic.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698