OLD | NEW |
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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 "SignalStrength": 40 | 287 "SignalStrength": 40 |
288 } | 288 } |
289 }, result); | 289 }, result); |
290 })); | 290 })); |
291 }, | 291 }, |
292 function getPropertiesCellular() { | 292 function getPropertiesCellular() { |
293 chrome.networkingPrivate.getProperties( | 293 chrome.networkingPrivate.getProperties( |
294 "stub_cellular1_guid", | 294 "stub_cellular1_guid", |
295 callbackPass(function(result) { | 295 callbackPass(function(result) { |
296 assertEq({ "Cellular": { | 296 assertEq({ "Cellular": { |
297 "ActivationState": "not-activated", | 297 "ActivationState": "NotActivated", |
298 "AllowRoaming": false, | 298 "AllowRoaming": false, |
299 "Carrier": "Cellular1_Carrier", | 299 "Carrier": "Cellular1_Carrier", |
300 "HomeProvider": { | 300 "HomeProvider": { |
301 "country": "us", | 301 "country": "us", |
302 "name": "Cellular1_Provider" | 302 "name": "Cellular1_Provider" |
303 }, | 303 }, |
304 "NetworkTechnology": "GSM", | 304 "NetworkTechnology": "GSM", |
305 "RoamingState": "home" | 305 "RoamingState": "Home" |
306 }, | 306 }, |
307 "ConnectionState": "NotConnected", | 307 "ConnectionState": "NotConnected", |
308 "GUID": "stub_cellular1_guid", | 308 "GUID": "stub_cellular1_guid", |
309 "Name": "cellular1", | 309 "Name": "cellular1", |
310 "Type": "Cellular" | 310 "Type": "Cellular" |
311 }, result); | 311 }, result); |
312 })); | 312 })); |
313 }, | 313 }, |
314 function getManagedProperties() { | 314 function getManagedProperties() { |
315 chrome.networkingPrivate.getManagedProperties( | 315 chrome.networkingPrivate.getManagedProperties( |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 new privateHelpers.watchForCaptivePortalState( | 508 new privateHelpers.watchForCaptivePortalState( |
509 'wifi_guid', 'Online', done); | 509 'wifi_guid', 'Online', done); |
510 chrome.test.sendMessage('notifyPortalDetectorObservers'); | 510 chrome.test.sendMessage('notifyPortalDetectorObservers'); |
511 }, | 511 }, |
512 ]; | 512 ]; |
513 | 513 |
514 var testToRun = window.location.search.substring(1); | 514 var testToRun = window.location.search.substring(1); |
515 chrome.test.runTests(availableTests.filter(function(op) { | 515 chrome.test.runTests(availableTests.filter(function(op) { |
516 return op.name == testToRun; | 516 return op.name == testToRun; |
517 })); | 517 })); |
OLD | NEW |