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

Unified Diff: chrome/test/data/extensions/api_test/networking/test.js

Issue 280023003: Implement networkingPrivate.getNetworks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/networking/test.js
diff --git a/chrome/test/data/extensions/api_test/networking/test.js b/chrome/test/data/extensions/api_test/networking/test.js
index 5f569d62876ab83f15d660fe256b82dc78fc4bdb..9cb16c28335ab72516436df1c30afafea2e5d677 100644
--- a/chrome/test/data/extensions/api_test/networking/test.js
+++ b/chrome/test/data/extensions/api_test/networking/test.js
@@ -121,6 +121,48 @@ var availableTests = [
}));
}));
},
+ function getNetworks() {
+ // Test 'type' and 'configured'.
+ chrome.networkingPrivate.getNetworks(
+ { "type": "WiFi", "visible": false, "configured": true },
+ callbackPass(function(result) {
+ assertEq([{
+ "Connectable": true,
+ "ConnectionState": "Connected",
+ "GUID": "stub_wifi1",
+ "Name": "wifi1",
+ "Type": "WiFi",
+ "WiFi": {
+ "Security": "WEP-PSK",
+ "SignalStrength": 40
+ }
+ }, {
+ "Connectable": true,
+ "ConnectionState": "NotConnected",
+ "GUID": "stub_wifi2",
+ "Name": "wifi2_PSK",
+ "Type": "WiFi",
+ "WiFi": {
+ "Security": "WPA-PSK",
+ "SignalStrength": 80
+ }
+ }], result);
+ // Test 'limit'.
+ chrome.networkingPrivate.getNetworks(
+ { "type": "All", "visible": false, "configured": true, "limit": 1 },
+ callbackPass(function(result) {
+ assertEq([{
+ "ConnectionState": "Connected",
+ "Ethernet": {
+ "Authentication": "None"
+ },
+ "GUID": "stub_ethernet",
+ "Name": "eth0",
+ "Type": "Ethernet"
+ }], result);
+ }));
+ }));
+ },
function getVisibleNetworks() {
chrome.networkingPrivate.getVisibleNetworks(
"All",
@@ -149,7 +191,7 @@ var availableTests = [
"ConnectionState": "Connected",
"GUID": "stub_vpn1",
"Name": "vpn1",
- "Type": "VPN",
+ "Type": "VPN"
},
{
"Connectable": true,

Powered by Google App Engine
This is Rietveld 408576698