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 // Note: the expectations in this test are shared by both the Chrome OS and | 5 // Note: the expectations in this test are shared by both the Chrome OS and |
6 // Win/Mac (ServiceClient) implementations. TODO(stevenjb): Set up a way for | 6 // Win/Mac (ServiceClient) implementations. TODO(stevenjb): Set up a way for |
7 // the test code to specify the correct expectations. | 7 // the test code to specify the correct expectations. |
8 | 8 |
9 var callbackPass = chrome.test.callbackPass; | 9 var callbackPass = chrome.test.callbackPass; |
10 var callbackFail = chrome.test.callbackFail; | 10 var callbackFail = chrome.test.callbackFail; |
11 var assertTrue = chrome.test.assertTrue; | 11 var assertTrue = chrome.test.assertTrue; |
12 var assertFalse = chrome.test.assertFalse; | 12 var assertFalse = chrome.test.assertFalse; |
13 var assertEq = chrome.test.assertEq; | 13 var assertEq = chrome.test.assertEq; |
14 | 14 |
15 // Test properties for the verification API. | 15 // Test properties for the verification API. |
16 var verificationProperties = { | 16 var verificationProperties = { |
17 "certificate": "certificate", | 17 "certificate": "certificate", |
18 "intermediateCertificates": ["ica1", "ica2", "ica3"], | |
19 "publicKey": "cHVibGljX2tleQ==", // Base64("public_key") | 18 "publicKey": "cHVibGljX2tleQ==", // Base64("public_key") |
20 "nonce": "nonce", | 19 "nonce": "nonce", |
21 "signedData": "c2lnbmVkX2RhdGE=", // Base64("signed_data") | 20 "signedData": "c2lnbmVkX2RhdGE=", // Base64("signed_data") |
22 "deviceSerial": "device_serial", | 21 "deviceSerial": "device_serial", |
23 "deviceSsid": "Device 0123", | 22 "deviceSsid": "Device 0123", |
24 "deviceBssid": "00:01:02:03:04:05" | 23 "deviceBssid": "00:01:02:03:04:05" |
25 }; | 24 }; |
26 | 25 |
27 var privateHelpers = { | 26 var privateHelpers = { |
28 // Watches for the states |expectedStates| in reverse order. If all states | 27 // Watches for the states |expectedStates| in reverse order. If all states |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 new privateHelpers.watchForCaptivePortalState( | 568 new privateHelpers.watchForCaptivePortalState( |
570 'wifi_guid', 'Online', done); | 569 'wifi_guid', 'Online', done); |
571 chrome.test.sendMessage('notifyPortalDetectorObservers'); | 570 chrome.test.sendMessage('notifyPortalDetectorObservers'); |
572 }, | 571 }, |
573 ]; | 572 ]; |
574 | 573 |
575 var testToRun = window.location.search.substring(1); | 574 var testToRun = window.location.search.substring(1); |
576 chrome.test.runTests(availableTests.filter(function(op) { | 575 chrome.test.runTests(availableTests.filter(function(op) { |
577 return op.name == testToRun; | 576 return op.name == testToRun; |
578 })); | 577 })); |
OLD | NEW |