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

Side by Side Diff: chrome/test/data/extensions/api_test/networking/test.js

Issue 320063002: NetworkingPrivate API events should supply list of GUIDs, not service paths (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var callbackPass = chrome.test.callbackPass; 5 var callbackPass = chrome.test.callbackPass;
6 var callbackFail = chrome.test.callbackFail; 6 var callbackFail = chrome.test.callbackFail;
7 var assertTrue = chrome.test.assertTrue; 7 var assertTrue = chrome.test.assertTrue;
8 var assertFalse = chrome.test.assertFalse; 8 var assertFalse = chrome.test.assertFalse;
9 var assertEq = chrome.test.assertEq; 9 var assertEq = chrome.test.assertEq;
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 self.onPortalDetectionCompleted); 67 self.onPortalDetectionCompleted);
68 done(); 68 done();
69 }; 69 };
70 chrome.networkingPrivate.onPortalDetectionCompleted.addListener( 70 chrome.networkingPrivate.onPortalDetectionCompleted.addListener(
71 self.onPortalDetectionCompleted); 71 self.onPortalDetectionCompleted);
72 } 72 }
73 }; 73 };
74 74
75 var availableTests = [ 75 var availableTests = [
76 function startConnect() { 76 function startConnect() {
77 chrome.networkingPrivate.startConnect("stub_wifi2", callbackPass()); 77 chrome.networkingPrivate.startConnect("stub_wifi2_GUID", callbackPass());
78 }, 78 },
79 function startDisconnect() { 79 function startDisconnect() {
80 // Must connect to a network before we can disconnect from it. 80 // Must connect to a network before we can disconnect from it.
81 chrome.networkingPrivate.startConnect("stub_wifi2", callbackPass( 81 chrome.networkingPrivate.startConnect("stub_wifi2_GUID", callbackPass(
82 function() { 82 function() {
83 chrome.networkingPrivate.startDisconnect("stub_wifi2", callbackPass()); 83 chrome.networkingPrivate.startDisconnect("stub_wifi2_GUID",
84 callbackPass());
84 })); 85 }));
85 }, 86 },
86 function startConnectNonexistent() { 87 function startConnectNonexistent() {
87 chrome.networkingPrivate.startConnect( 88 chrome.networkingPrivate.startConnect(
88 "nonexistent_path", 89 "nonexistent_path",
89 callbackFail("Error.InvalidNetworkGuid")); 90 callbackFail("Error.InvalidNetworkGuid"));
90 }, 91 },
91 function startDisconnectNonexistent() { 92 function startDisconnectNonexistent() {
92 chrome.networkingPrivate.startDisconnect( 93 chrome.networkingPrivate.startDisconnect(
93 "nonexistent_path", 94 "nonexistent_path",
(...skipping 28 matching lines...) Expand all
122 })); 123 }));
123 }, 124 },
124 function getNetworks() { 125 function getNetworks() {
125 // Test 'type' and 'configured'. 126 // Test 'type' and 'configured'.
126 chrome.networkingPrivate.getNetworks( 127 chrome.networkingPrivate.getNetworks(
127 { "networkType": "WiFi", "configured": true }, 128 { "networkType": "WiFi", "configured": true },
128 callbackPass(function(result) { 129 callbackPass(function(result) {
129 assertEq([{ 130 assertEq([{
130 "Connectable": true, 131 "Connectable": true,
131 "ConnectionState": "Connected", 132 "ConnectionState": "Connected",
132 "GUID": "stub_wifi1", 133 "GUID": "stub_wifi1_GUID",
133 "Name": "wifi1", 134 "Name": "wifi1",
134 "Type": "WiFi", 135 "Type": "WiFi",
135 "WiFi": { 136 "WiFi": {
136 "Security": "WEP-PSK", 137 "Security": "WEP-PSK",
137 "SignalStrength": 40 138 "SignalStrength": 40
138 } 139 }
139 }, { 140 }, {
140 "GUID": "stub_wifi2", 141 "GUID": "stub_wifi2_GUID",
141 "Name": "wifi2_PSK", 142 "Name": "wifi2_PSK",
142 "Type": "WiFi", 143 "Type": "WiFi",
143 "WiFi": { 144 "WiFi": {
144 "Security": "WPA-PSK", 145 "Security": "WPA-PSK",
145 } 146 }
146 }], result); 147 }], result);
147 148
148 // Test 'visible' (and 'configured'). 149 // Test 'visible' (and 'configured').
149 chrome.networkingPrivate.getNetworks( 150 chrome.networkingPrivate.getNetworks(
150 { "networkType": "WiFi", "visible": true, "configured": true }, 151 { "networkType": "WiFi", "visible": true, "configured": true },
151 callbackPass(function(result) { 152 callbackPass(function(result) {
152 assertEq([{ 153 assertEq([{
153 "Connectable": true, 154 "Connectable": true,
154 "ConnectionState": "Connected", 155 "ConnectionState": "Connected",
155 "GUID": "stub_wifi1", 156 "GUID": "stub_wifi1_GUID",
156 "Name": "wifi1", 157 "Name": "wifi1",
157 "Type": "WiFi", 158 "Type": "WiFi",
158 "WiFi": { 159 "WiFi": {
159 "Security": "WEP-PSK", 160 "Security": "WEP-PSK",
160 "SignalStrength": 40 161 "SignalStrength": 40
161 } 162 }
162 }], result); 163 }], result);
163 164
164 // Test 'limit'. 165 // Test 'limit'.
165 chrome.networkingPrivate.getNetworks( 166 chrome.networkingPrivate.getNetworks(
166 { "networkType": "All", "limit": 1 }, 167 { "networkType": "All", "limit": 1 },
167 callbackPass(function(result) { 168 callbackPass(function(result) {
168 assertEq([{ 169 assertEq([{
169 "ConnectionState": "Connected", 170 "ConnectionState": "Connected",
170 "Ethernet": { 171 "Ethernet": {
171 "Authentication": "None" 172 "Authentication": "None"
172 }, 173 },
173 "GUID": "stub_ethernet", 174 "GUID": "stub_ethernet_GUID",
174 "Name": "eth0", 175 "Name": "eth0",
175 "Type": "Ethernet" 176 "Type": "Ethernet"
176 }], result); 177 }], result);
177 })); 178 }));
178 })); 179 }));
179 })); 180 }));
180 }, 181 },
181 function getVisibleNetworks() { 182 function getVisibleNetworks() {
182 chrome.networkingPrivate.getVisibleNetworks( 183 chrome.networkingPrivate.getVisibleNetworks(
183 "All", 184 "All",
184 callbackPass(function(result) { 185 callbackPass(function(result) {
185 assertEq([{ 186 assertEq([{
186 "ConnectionState": "Connected", 187 "ConnectionState": "Connected",
187 "Ethernet": { 188 "Ethernet": {
188 "Authentication": "None" 189 "Authentication": "None"
189 }, 190 },
190 "GUID": "stub_ethernet", 191 "GUID": "stub_ethernet_GUID",
191 "Name": "eth0", 192 "Name": "eth0",
192 "Type": "Ethernet" 193 "Type": "Ethernet"
193 }, 194 },
194 { 195 {
195 "Connectable": true, 196 "Connectable": true,
196 "ConnectionState": "Connected", 197 "ConnectionState": "Connected",
197 "GUID": "stub_wifi1", 198 "GUID": "stub_wifi1_GUID",
198 "Name": "wifi1", 199 "Name": "wifi1",
199 "Type": "WiFi", 200 "Type": "WiFi",
200 "WiFi": { 201 "WiFi": {
201 "Security": "WEP-PSK", 202 "Security": "WEP-PSK",
202 "SignalStrength": 40 203 "SignalStrength": 40
203 } 204 }
204 }, 205 },
205 { 206 {
206 "ConnectionState": "Connected", 207 "ConnectionState": "Connected",
207 "GUID": "stub_vpn1", 208 "GUID": "stub_vpn1_GUID",
208 "Name": "vpn1", 209 "Name": "vpn1",
209 "Type": "VPN" 210 "Type": "VPN"
210 }, 211 },
211 { 212 {
212 "Connectable": true, 213 "Connectable": true,
213 "ConnectionState": "NotConnected", 214 "ConnectionState": "NotConnected",
214 "GUID": "stub_wifi2", 215 "GUID": "stub_wifi2_GUID",
215 "Name": "wifi2_PSK", 216 "Name": "wifi2_PSK",
216 "Type": "WiFi", 217 "Type": "WiFi",
217 "WiFi": { 218 "WiFi": {
218 "Security": "WPA-PSK", 219 "Security": "WPA-PSK",
219 "SignalStrength": 80 220 "SignalStrength": 80
220 } 221 }
221 }], result); 222 }], result);
222 })); 223 }));
223 }, 224 },
224 function getVisibleNetworksWifi() { 225 function getVisibleNetworksWifi() {
225 chrome.networkingPrivate.getVisibleNetworks( 226 chrome.networkingPrivate.getVisibleNetworks(
226 "WiFi", 227 "WiFi",
227 callbackPass(function(result) { 228 callbackPass(function(result) {
228 assertEq([{ 229 assertEq([{
229 "Connectable": true, 230 "Connectable": true,
230 "ConnectionState": "Connected", 231 "ConnectionState": "Connected",
231 "GUID": "stub_wifi1", 232 "GUID": "stub_wifi1_GUID",
232 "Name": "wifi1", 233 "Name": "wifi1",
233 "Type": "WiFi", 234 "Type": "WiFi",
234 "WiFi": { 235 "WiFi": {
235 "Security": "WEP-PSK", 236 "Security": "WEP-PSK",
236 "SignalStrength": 40 237 "SignalStrength": 40
237 } 238 }
238 }, 239 },
239 { 240 {
240 "Connectable": true, 241 "Connectable": true,
241 "ConnectionState": "NotConnected", 242 "ConnectionState": "NotConnected",
242 "GUID": "stub_wifi2", 243 "GUID": "stub_wifi2_GUID",
243 "Name": "wifi2_PSK", 244 "Name": "wifi2_PSK",
244 "Type": "WiFi", 245 "Type": "WiFi",
245 "WiFi": { 246 "WiFi": {
246 "Security": "WPA-PSK", 247 "Security": "WPA-PSK",
247 "SignalStrength": 80 248 "SignalStrength": 80
248 } 249 }
249 } 250 }
250 ], result); 251 ], result);
251 })); 252 }));
252 }, 253 },
253 function requestNetworkScan() { 254 function requestNetworkScan() {
254 // Connected or Connecting networks should be listed first, sorted by type. 255 // Connected or Connecting networks should be listed first, sorted by type.
255 var expected = ["stub_ethernet", 256 var expected = ["stub_ethernet_GUID",
256 "stub_wifi1", 257 "stub_wifi1_GUID",
257 "stub_vpn1", 258 "stub_vpn1_GUID",
258 "stub_wifi2"]; 259 "stub_wifi2_GUID"];
259 var done = chrome.test.callbackAdded(); 260 var done = chrome.test.callbackAdded();
260 var listener = new privateHelpers.listListener(expected, done); 261 var listener = new privateHelpers.listListener(expected, done);
261 chrome.networkingPrivate.onNetworkListChanged.addListener( 262 chrome.networkingPrivate.onNetworkListChanged.addListener(
262 listener.listenForChanges); 263 listener.listenForChanges);
263 chrome.networkingPrivate.requestNetworkScan(); 264 chrome.networkingPrivate.requestNetworkScan();
264 }, 265 },
265 function getProperties() { 266 function getProperties() {
266 chrome.networkingPrivate.getProperties( 267 chrome.networkingPrivate.getProperties(
267 "stub_wifi1", 268 "stub_wifi1_GUID",
268 callbackPass(function(result) { 269 callbackPass(function(result) {
269 assertEq({ "Connectable": true, 270 assertEq({ "Connectable": true,
270 "ConnectionState": "Connected", 271 "ConnectionState": "Connected",
271 "GUID": "stub_wifi1", 272 "GUID": "stub_wifi1_GUID",
272 "MacAddress": "00:11:22:AA:BB:CC", 273 "MacAddress": "00:11:22:AA:BB:CC",
273 "IPConfigs": [{ 274 "IPConfigs": [{
274 "Gateway": "0.0.0.1", 275 "Gateway": "0.0.0.1",
275 "IPAddress": "0.0.0.0", 276 "IPAddress": "0.0.0.0",
276 "RoutingPrefix": 0, 277 "RoutingPrefix": 0,
277 "Type": "IPv4" 278 "Type": "IPv4"
278 }], 279 }],
279 "Name": "wifi1", 280 "Name": "wifi1",
280 "Type": "WiFi", 281 "Type": "WiFi",
281 "WiFi": { 282 "WiFi": {
282 "Frequency": 2400, 283 "Frequency": 2400,
283 "FrequencyList": [2400], 284 "FrequencyList": [2400],
284 "SSID": "wifi1", 285 "SSID": "wifi1",
285 "Security": "WEP-PSK", 286 "Security": "WEP-PSK",
286 "SignalStrength": 40 287 "SignalStrength": 40
287 } 288 }
288 }, result); 289 }, result);
289 })); 290 }));
290 }, 291 },
291 function getPropertiesCellular() { 292 function getPropertiesCellular() {
292 chrome.networkingPrivate.getProperties( 293 chrome.networkingPrivate.getProperties(
293 "stub_cellular1", 294 "stub_cellular1_GUID",
294 callbackPass(function(result) { 295 callbackPass(function(result) {
295 assertEq({ "Cellular": { 296 assertEq({ "Cellular": {
296 "ActivationState": "not-activated", 297 "ActivationState": "not-activated",
297 "AllowRoaming": false, 298 "AllowRoaming": false,
298 "Carrier": "Cellular1_Carrier", 299 "Carrier": "Cellular1_Carrier",
299 "HomeProvider": { 300 "HomeProvider": {
300 "country": "us", 301 "country": "us",
301 "name": "Cellular1_Provider" 302 "name": "Cellular1_Provider"
302 }, 303 },
303 "NetworkTechnology": "GSM", 304 "NetworkTechnology": "GSM",
304 "RoamingState": "home" 305 "RoamingState": "home"
305 }, 306 },
306 "ConnectionState": "NotConnected", 307 "ConnectionState": "NotConnected",
307 "GUID": "stub_cellular1", 308 "GUID": "stub_cellular1_GUID",
308 "Name": "cellular1", 309 "Name": "cellular1",
309 "Type": "Cellular" 310 "Type": "Cellular"
310 }, result); 311 }, result);
311 })); 312 }));
312 }, 313 },
313 function getManagedProperties() { 314 function getManagedProperties() {
314 chrome.networkingPrivate.getManagedProperties( 315 chrome.networkingPrivate.getManagedProperties(
315 "stub_wifi2", 316 "stub_wifi2",
316 callbackPass(function(result) { 317 callbackPass(function(result) {
317 assertEq({ 318 assertEq({
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 "SignalStrength": { 366 "SignalStrength": {
366 "Active": 80, 367 "Active": 80,
367 "Effective": "Unmanaged" 368 "Effective": "Unmanaged"
368 } 369 }
369 } 370 }
370 }, result); 371 }, result);
371 })); 372 }));
372 }, 373 },
373 function setProperties() { 374 function setProperties() {
374 var done = chrome.test.callbackAdded(); 375 var done = chrome.test.callbackAdded();
375 var network_guid = "stub_wifi2"; 376 var network_guid = "stub_wifi2_GUID";
376 chrome.networkingPrivate.getProperties( 377 chrome.networkingPrivate.getProperties(
377 network_guid, 378 network_guid,
378 callbackPass(function(result) { 379 callbackPass(function(result) {
379 assertEq(network_guid, result.GUID); 380 assertEq(network_guid, result.GUID);
380 result.WiFi.Security = "WEP-PSK"; 381 result.WiFi.Security = "WEP-PSK";
381 chrome.networkingPrivate.setProperties( 382 chrome.networkingPrivate.setProperties(
382 network_guid, 383 network_guid,
383 result, 384 result,
384 callbackPass(function() { 385 callbackPass(function() {
385 chrome.networkingPrivate.getProperties( 386 chrome.networkingPrivate.getProperties(
386 network_guid, 387 network_guid,
387 callbackPass(function(result) { 388 callbackPass(function(result) {
388 // Ensure that the property was set. 389 // Ensure that the property was set.
389 assertEq("WEP-PSK", result.WiFi.Security); 390 assertEq("WEP-PSK", result.WiFi.Security);
390 // Ensure that the GUID doesn't change. 391 // Ensure that the GUID doesn't change.
391 assertEq(network_guid, result.GUID); 392 assertEq(network_guid, result.GUID);
392 done(); 393 done();
393 })); 394 }));
394 })); 395 }));
395 })); 396 }));
396 }, 397 },
397 function getState() { 398 function getState() {
398 chrome.networkingPrivate.getState( 399 chrome.networkingPrivate.getState(
399 "stub_wifi2", 400 "stub_wifi2_GUID",
400 callbackPass(function(result) { 401 callbackPass(function(result) {
401 assertEq({ 402 assertEq({
402 "Connectable": true, 403 "Connectable": true,
403 "ConnectionState": "NotConnected", 404 "ConnectionState": "NotConnected",
404 "GUID": "stub_wifi2", 405 "GUID": "stub_wifi2_GUID",
405 "Name": "wifi2_PSK", 406 "Name": "wifi2_PSK",
406 "Type": "WiFi", 407 "Type": "WiFi",
407 "WiFi": { 408 "WiFi": {
408 "Security": "WPA-PSK", 409 "Security": "WPA-PSK",
409 "SignalStrength": 80 410 "SignalStrength": 80
410 } 411 }
411 }, result); 412 }, result);
412 })); 413 }));
413 }, 414 },
414 function getStateNonExistent() { 415 function getStateNonExistent() {
415 chrome.networkingPrivate.getState( 416 chrome.networkingPrivate.getState(
416 'non_existent', 417 'non_existent',
417 callbackFail('Error.InvalidNetworkGuid')); 418 callbackFail('Error.InvalidNetworkGuid'));
418 }, 419 },
419 function onNetworksChangedEventConnect() { 420 function onNetworksChangedEventConnect() {
420 var network = "stub_wifi2"; 421 var network = "stub_wifi2_GUID";
421 var done = chrome.test.callbackAdded(); 422 var done = chrome.test.callbackAdded();
422 var expectedStates = ["Connected"]; 423 var expectedStates = ["Connected"];
423 var listener = 424 var listener =
424 new privateHelpers.watchForStateChanges(network, expectedStates, done); 425 new privateHelpers.watchForStateChanges(network, expectedStates, done);
425 chrome.networkingPrivate.startConnect(network, callbackPass()); 426 chrome.networkingPrivate.startConnect(network, callbackPass());
426 }, 427 },
427 function onNetworksChangedEventDisconnect() { 428 function onNetworksChangedEventDisconnect() {
428 var network = "stub_wifi1"; 429 var network = "stub_wifi1_GUID";
429 var done = chrome.test.callbackAdded(); 430 var done = chrome.test.callbackAdded();
430 var expectedStates = ["NotConnected"]; 431 var expectedStates = ["NotConnected"];
431 var listener = 432 var listener =
432 new privateHelpers.watchForStateChanges(network, expectedStates, done); 433 new privateHelpers.watchForStateChanges(network, expectedStates, done);
433 chrome.networkingPrivate.startDisconnect(network, callbackPass()); 434 chrome.networkingPrivate.startDisconnect(network, callbackPass());
434 }, 435 },
435 function onNetworkListChangedEvent() { 436 function onNetworkListChangedEvent() {
436 // Connecting to wifi2 should set wifi1 to offline. Connected or Connecting 437 // Connecting to wifi2 should set wifi1 to offline. Connected or Connecting
437 // networks should be listed first, sorted by type. 438 // networks should be listed first, sorted by type.
438 var expected = ["stub_ethernet", 439 var expected = ["stub_ethernet_GUID",
439 "stub_wifi2", 440 "stub_wifi2_GUID",
440 "stub_vpn1", 441 "stub_vpn1_GUID",
441 "stub_wifi1"]; 442 "stub_wifi1_GUID"];
442 var done = chrome.test.callbackAdded(); 443 var done = chrome.test.callbackAdded();
443 var listener = new privateHelpers.listListener(expected, done); 444 var listener = new privateHelpers.listListener(expected, done);
444 chrome.networkingPrivate.onNetworkListChanged.addListener( 445 chrome.networkingPrivate.onNetworkListChanged.addListener(
445 listener.listenForChanges); 446 listener.listenForChanges);
446 var network = "stub_wifi2"; 447 var network = "stub_wifi2_GUID";
447 chrome.networkingPrivate.startConnect(network, callbackPass()); 448 chrome.networkingPrivate.startConnect(network, callbackPass());
448 }, 449 },
449 function verifyDestination() { 450 function verifyDestination() {
450 chrome.networkingPrivate.verifyDestination( 451 chrome.networkingPrivate.verifyDestination(
451 verificationProperties, 452 verificationProperties,
452 callbackPass(function(isValid) { 453 callbackPass(function(isValid) {
453 assertTrue(isValid); 454 assertTrue(isValid);
454 })); 455 }));
455 }, 456 },
456 function verifyAndEncryptCredentials() { 457 function verifyAndEncryptCredentials() {
457 var network_guid = "stub_wifi2"; 458 var network_guid = "stub_wifi2_GUID";
458 chrome.networkingPrivate.verifyAndEncryptCredentials( 459 chrome.networkingPrivate.verifyAndEncryptCredentials(
459 verificationProperties, 460 verificationProperties,
460 network_guid, 461 network_guid,
461 callbackPass(function(result) { 462 callbackPass(function(result) {
462 assertEq("encrypted_credentials", result); 463 assertEq("encrypted_credentials", result);
463 })); 464 }));
464 }, 465 },
465 function verifyAndEncryptData() { 466 function verifyAndEncryptData() {
466 chrome.networkingPrivate.verifyAndEncryptData( 467 chrome.networkingPrivate.verifyAndEncryptData(
467 verificationProperties, 468 verificationProperties,
(...skipping 11 matching lines...) Expand all
479 })); 480 }));
480 }, 481 },
481 function getWifiTDLSStatus() { 482 function getWifiTDLSStatus() {
482 chrome.networkingPrivate.getWifiTDLSStatus( 483 chrome.networkingPrivate.getWifiTDLSStatus(
483 "aa:bb:cc:dd:ee:ff", 484 "aa:bb:cc:dd:ee:ff",
484 callbackPass(function(result) { 485 callbackPass(function(result) {
485 assertEq("Connected", result); 486 assertEq("Connected", result);
486 })); 487 }));
487 }, 488 },
488 function getCaptivePortalStatus() { 489 function getCaptivePortalStatus() {
489 var networks = [['stub_ethernet', 'Online'], 490 var networks = [['stub_ethernet_GUID', 'Online'],
490 ['stub_wifi1', 'Offline'], 491 ['stub_wifi1_GUID', 'Offline'],
491 ['stub_wifi2', 'Portal'], 492 ['stub_wifi2_GUID', 'Portal'],
492 ['stub_cellular1', 'ProxyAuthRequired'], 493 ['stub_cellular1_GUID', 'ProxyAuthRequired'],
493 ['stub_vpn1', 'Unknown']]; 494 ['stub_vpn1_GUID', 'Unknown']];
494 networks.forEach(function(network) { 495 networks.forEach(function(network) {
495 var servicePath = network[0]; 496 var servicePath = network[0];
496 var expectedStatus = network[1]; 497 var expectedStatus = network[1];
497 chrome.networkingPrivate.getCaptivePortalStatus( 498 chrome.networkingPrivate.getCaptivePortalStatus(
498 servicePath, 499 servicePath,
499 callbackPass(function(status) { 500 callbackPass(function(status) {
500 assertEq(expectedStatus, status); 501 assertEq(expectedStatus, status);
501 })); 502 }));
502 }); 503 });
503 }, 504 },
504 function captivePortalNotification() { 505 function captivePortalNotification() {
505 var done = chrome.test.callbackAdded(); 506 var done = chrome.test.callbackAdded();
506 var listener = 507 var listener =
507 new privateHelpers.watchForCaptivePortalState('wifi', 'Online', done); 508 new privateHelpers.watchForCaptivePortalState(
509 'wifi_GUID', 'Online', done);
508 chrome.test.sendMessage('notifyPortalDetectorObservers'); 510 chrome.test.sendMessage('notifyPortalDetectorObservers');
509 }, 511 },
510 ]; 512 ];
511 513
512 var testToRun = window.location.search.substring(1); 514 var testToRun = window.location.search.substring(1);
513 chrome.test.runTests(availableTests.filter(function(op) { 515 chrome.test.runTests(availableTests.filter(function(op) {
514 return op.name == testToRun; 516 return op.name == testToRun;
515 })); 517 }));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698