| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 { networkType: 'Ethernet' }, callbackPass(callbackResult)); | 60 { networkType: 'Ethernet' }, callbackPass(callbackResult)); |
| 61 }, | 61 }, |
| 62 function getVisibleNetworks() { | 62 function getVisibleNetworks() { |
| 63 chrome.networkingPrivate.getVisibleNetworks( | 63 chrome.networkingPrivate.getVisibleNetworks( |
| 64 'Ethernet', callbackPass(callbackResult)); | 64 'Ethernet', callbackPass(callbackResult)); |
| 65 }, | 65 }, |
| 66 function getEnabledNetworkTypes() { | 66 function getEnabledNetworkTypes() { |
| 67 chrome.networkingPrivate.getEnabledNetworkTypes( | 67 chrome.networkingPrivate.getEnabledNetworkTypes( |
| 68 callbackPass(callbackResult)); | 68 callbackPass(callbackResult)); |
| 69 }, | 69 }, |
| 70 function getDeviceStates() { |
| 71 chrome.networkingPrivate.getDeviceStates(callbackPass(callbackResult)); |
| 72 }, |
| 70 function enableNetworkType() { | 73 function enableNetworkType() { |
| 71 chrome.networkingPrivate.enableNetworkType('Ethernet'); | 74 chrome.networkingPrivate.enableNetworkType('Ethernet'); |
| 72 chrome.test.succeed(); | 75 chrome.test.succeed(); |
| 73 }, | 76 }, |
| 74 function disableNetworkType() { | 77 function disableNetworkType() { |
| 75 chrome.networkingPrivate.disableNetworkType('Ethernet'); | 78 chrome.networkingPrivate.disableNetworkType('Ethernet'); |
| 76 chrome.test.succeed(); | 79 chrome.test.succeed(); |
| 77 }, | 80 }, |
| 78 function requestNetworkScan() { | 81 function requestNetworkScan() { |
| 79 chrome.networkingPrivate.requestNetworkScan(); | 82 chrome.networkingPrivate.requestNetworkScan(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 function getCaptivePortalStatus() { | 117 function getCaptivePortalStatus() { |
| 115 chrome.networkingPrivate.getWifiTDLSStatus( | 118 chrome.networkingPrivate.getWifiTDLSStatus( |
| 116 kGuid, callbackPass(callbackResult)); | 119 kGuid, callbackPass(callbackResult)); |
| 117 }, | 120 }, |
| 118 ]; | 121 ]; |
| 119 | 122 |
| 120 var testToRun = window.location.search.substring(1); | 123 var testToRun = window.location.search.substring(1); |
| 121 chrome.test.runTests(availableTests.filter(function(op) { | 124 chrome.test.runTests(availableTests.filter(function(op) { |
| 122 return op.name == testToRun; | 125 return op.name == testToRun; |
| 123 })); | 126 })); |
| OLD | NEW |