Chromium Code Reviews| 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..dcccbc8dfcf19dfea06e0b15924bcc0f52ad72c1 100644 |
| --- a/chrome/test/data/extensions/api_test/networking/test.js |
| +++ b/chrome/test/data/extensions/api_test/networking/test.js |
| @@ -80,6 +80,40 @@ chrome.test.runTests([ |
| assertEq("WiFi", result.Type); |
| })); |
| }, |
| + function propertiesChangeEvent() { |
| + 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); |
| + }); |
|
not at google - send to devlin
2013/02/05 21:43:20
The event might (probably will) come in before the
Greg Spencer (Chromium)
2013/02/05 22:36:35
Thanks, I was wondering how to do that. Done.
|
| + chrome.networkingPrivate.startConnect("stub_wifi1", |
| + callbackPass(function() {})); |
| + }, |
| function startConnect() { |
| chrome.networkingPrivate.startConnect("stub_wifi2", |
| callbackPass(function() {})); |