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

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

Issue 12188027: This adds the onNetworkChanged event to networkingPrivate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing virtual keyword Created 7 years, 10 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') | no next file » | 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 5503ced293932998012d9546437436cd5d410326..7520de211369d82fe643a27cf1d5fa1496e16211 100644
--- a/chrome/test/data/extensions/api_test/networking/test.js
+++ b/chrome/test/data/extensions/api_test/networking/test.js
@@ -80,6 +80,42 @@ chrome.test.runTests([
assertEq("WiFi", result.Type);
}));
},
+ function propertiesChangeEvent() {
+ var done = chrome.test.callbackAdded();
+ chrome.networkingPrivate.onNetworkChanged.addListener(
+ function (properties) {
+ assertEq(
+ [
+ {
+ "ConnectionState": "Connected",
+ "GUID": "stub_ethernet",
+ "Name": "eth0",
+ "Type": "Ethernet"
+ },
+ {
+ "ConnectionState": "Connecting",
+ "GUID": "stub_wifi1",
+ "Name": "wifi1",
+ "Type": "WiFi"
+ },
+ {
+ "ConnectionState": "NotConnected",
+ "GUID": "stub_wifi2",
+ "Name": "wifi2_PSK",
+ "Type": "WiFi"
+ },
+ {
+ "ConnectionState": "NotConnected",
+ "GUID": "stub_cellular1",
+ "Name": "cellular1",
+ "Type": "Cellular"
+ }
+ ], properties);
+ done();
+ });
+ chrome.networkingPrivate.startConnect("stub_wifi1",
+ callbackPass(function() {}));
+ },
function startConnect() {
chrome.networkingPrivate.startConnect("stub_wifi2",
callbackPass(function() {}));
« no previous file with comments | « chrome/common/extensions/api/networking_private.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698