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

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

Issue 12541007: This adds the setProperties and getState functions to the networking API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload after merge Created 7 years, 9 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/dbus/shill_manager_client_stub.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 0b76fd0121b9ddaf5d0648edec67e8683738fed8..1028fea7e69e1ad2079d852e8db036018c636e1c 100644
--- a/chrome/test/data/extensions/api_test/networking/test.js
+++ b/chrome/test/data/extensions/api_test/networking/test.js
@@ -170,6 +170,39 @@ var availableTests = [
}, result);
}));
},
+ function setProperties() {
+ var done = chrome.test.callbackAdded();
+ chrome.networkingPrivate.getProperties(
+ "stub_wifi2",
+ function(result) {
+ result.WiFi.Security = "WEP-PSK";
+ chrome.networkingPrivate.setProperties("stub_wifi2", result,
+ function() {
+ chrome.networkingPrivate.getProperties(
+ "stub_wifi2",
+ function(result) {
+ assertEq("WEP-PSK", result.WiFi.Security);
+ done();
+ });
+ });
+ });
+ },
+ function getState() {
+ chrome.networkingPrivate.getState(
+ "stub_wifi2",
+ callbackPass(function(result) {
+ assertEq({
+ "ConnectionState": "NotConnected",
+ "GUID": "",
+ "Name": "wifi2_PSK",
+ "Type": "WiFi",
+ "WiFi": {
+ "Security": "WPA-PSK",
+ "SignalStrength": 80
+ }
+ }, result);
+ }));
+ },
function onNetworksChangedEventConnect() {
var network = "stub_wifi2";
var done = chrome.test.callbackAdded();
« no previous file with comments | « chrome/common/extensions/api/networking_private.json ('k') | chromeos/dbus/shill_manager_client_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698