| 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 |
| 11 // Test properties for the verification API. | 11 // Test properties for the verification API. |
| 12 var verificationProperties = { | 12 var verificationProperties = { |
| 13 "certificate": "certificate", | 13 "certificate": "certificate", |
| 14 "publicKey": "public_key", | 14 "publicKey": "cHVibGljX2tleQ==", // Base64("public_key") |
| 15 "nonce": "nonce", | 15 "nonce": "nonce", |
| 16 "signedData": "signed_data", | 16 "signedData": "c2lnbmVkX2RhdGE=", // Base64("signed_data") |
| 17 "deviceSerial": "device_serial", | 17 "deviceSerial": "device_serial", |
| 18 "deviceSsid": "Device 0123", | 18 "deviceSsid": "Device 0123", |
| 19 "deviceBssid": "00:01:02:03:04:05" | 19 "deviceBssid": "00:01:02:03:04:05" |
| 20 }; | 20 }; |
| 21 | 21 |
| 22 var privateHelpers = { | 22 var privateHelpers = { |
| 23 // Watches for the states |expectedStates| in reverse order. If all states | 23 // Watches for the states |expectedStates| in reverse order. If all states |
| 24 // were observed in the right order, succeeds and calls |done|. If any | 24 // were observed in the right order, succeeds and calls |done|. If any |
| 25 // unexpected state is observed, fails. | 25 // unexpected state is observed, fails. |
| 26 watchForStateChanges: function(network, expectedStates, done) { | 26 watchForStateChanges: function(network, expectedStates, done) { |
| (...skipping 481 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 |