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

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: Rebase 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
« no previous file with comments | « chrome/common/extensions/api/networking_private.json ('k') | chromeos/network/network_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c08d96286ea46b00e9ec8260ac4bc251b8ce8ba0..5aab92dd964683e6d594987723b880175d9d17ca 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,
« no previous file with comments | « chrome/common/extensions/api/networking_private.json ('k') | chromeos/network/network_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698