| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This just tests the interface. It does not test for specific results, only | 5 // This just tests the interface. It does not test for specific results, only |
| 6 // that callbacks are correctly invoked, expected parameters are correct, | 6 // that callbacks are correctly invoked, expected parameters are correct, |
| 7 // and failures are detected. | 7 // and failures are detected. |
| 8 | 8 |
| 9 var callbackPass = chrome.test.callbackPass; | 9 var callbackPass = chrome.test.callbackPass; |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 kGuid, callbackPass(callbackResult)); | 44 kGuid, callbackPass(callbackResult)); |
| 45 }, | 45 }, |
| 46 function setProperties() { | 46 function setProperties() { |
| 47 chrome.networkingPrivate.setProperties( | 47 chrome.networkingPrivate.setProperties( |
| 48 kGuid, { 'GUID': kGuid }, callbackPass(callbackResult)); | 48 kGuid, { 'GUID': kGuid }, callbackPass(callbackResult)); |
| 49 }, | 49 }, |
| 50 function createNetwork() { | 50 function createNetwork() { |
| 51 chrome.networkingPrivate.createNetwork( | 51 chrome.networkingPrivate.createNetwork( |
| 52 false, { 'GUID': kGuid }, callbackPass(callbackResult)); | 52 false, { 'GUID': kGuid }, callbackPass(callbackResult)); |
| 53 }, | 53 }, |
| 54 function forgetNetwork() { |
| 55 chrome.networkingPrivate.forgetNetwork( |
| 56 kGuid, callbackPass(callbackResult)); |
| 57 }, |
| 54 function getNetworks() { | 58 function getNetworks() { |
| 55 chrome.networkingPrivate.getNetworks( | 59 chrome.networkingPrivate.getNetworks( |
| 56 { networkType: 'Ethernet' }, callbackPass(callbackResult)); | 60 { networkType: 'Ethernet' }, callbackPass(callbackResult)); |
| 57 }, | 61 }, |
| 58 function getVisibleNetworks() { | 62 function getVisibleNetworks() { |
| 59 chrome.networkingPrivate.getVisibleNetworks( | 63 chrome.networkingPrivate.getVisibleNetworks( |
| 60 'Ethernet', callbackPass(callbackResult)); | 64 'Ethernet', callbackPass(callbackResult)); |
| 61 }, | 65 }, |
| 62 function getEnabledNetworkTypes() { | 66 function getEnabledNetworkTypes() { |
| 63 chrome.networkingPrivate.getEnabledNetworkTypes( | 67 chrome.networkingPrivate.getEnabledNetworkTypes( |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 function getCaptivePortalStatus() { | 114 function getCaptivePortalStatus() { |
| 111 chrome.networkingPrivate.getWifiTDLSStatus( | 115 chrome.networkingPrivate.getWifiTDLSStatus( |
| 112 kGuid, callbackPass(callbackResult)); | 116 kGuid, callbackPass(callbackResult)); |
| 113 }, | 117 }, |
| 114 ]; | 118 ]; |
| 115 | 119 |
| 116 var testToRun = window.location.search.substring(1); | 120 var testToRun = window.location.search.substring(1); |
| 117 chrome.test.runTests(availableTests.filter(function(op) { | 121 chrome.test.runTests(availableTests.filter(function(op) { |
| 118 return op.name == testToRun; | 122 return op.name == testToRun; |
| 119 })); | 123 })); |
| OLD | NEW |