| 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 // The expectations in this test for the Chrome OS implementation. See | 5 // The expectations in this test for the Chrome OS implementation. See |
| 6 // networking_private_chromeos_apitest.cc for more info. | 6 // networking_private_chromeos_apitest.cc for more info. |
| 7 | 7 |
| 8 var callbackPass = chrome.test.callbackPass; | 8 var callbackPass = chrome.test.callbackPass; |
| 9 var callbackFail = chrome.test.callbackFail; | 9 var callbackFail = chrome.test.callbackFail; |
| 10 var assertTrue = chrome.test.assertTrue; | 10 var assertTrue = chrome.test.assertTrue; |
| (...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 kCellularGuid, newPin, kDefaultPuk, | 866 kCellularGuid, newPin, kDefaultPuk, |
| 867 callbackPass(function() { | 867 callbackPass(function() { |
| 868 // Set state with the new PIN, expect success. | 868 // Set state with the new PIN, expect success. |
| 869 var simState = {requirePin: true, currentPin: newPin}; | 869 var simState = {requirePin: true, currentPin: newPin}; |
| 870 chrome.networkingPrivate.setCellularSimState( | 870 chrome.networkingPrivate.setCellularSimState( |
| 871 kCellularGuid, simState, networkCallbackPass()); | 871 kCellularGuid, simState, networkCallbackPass()); |
| 872 })); | 872 })); |
| 873 })); | 873 })); |
| 874 })); | 874 })); |
| 875 }))); | 875 }))); |
| 876 } | 876 }, |
| 877 function getGlobalPolicy() { |
| 878 chrome.networkingPrivate.getGlobalPolicy(callbackPass(function(result) { |
| 879 assertEq({ |
| 880 AllowOnlyPolicyNetworksToAutoconnect: true, |
| 881 AllowOnlyPolicyNetworksToConnect: false, |
| 882 }, result); |
| 883 })); |
| 884 }, |
| 877 ]; | 885 ]; |
| 878 | 886 |
| 879 chrome.test.getConfig(function(config) { | 887 chrome.test.getConfig(function(config) { |
| 880 var args = JSON.parse(config.customArg); | 888 var args = JSON.parse(config.customArg); |
| 881 var tests = availableTests.filter(function(op) { | 889 var tests = availableTests.filter(function(op) { |
| 882 return args.test == op.name; | 890 return args.test == op.name; |
| 883 }); | 891 }); |
| 884 if (tests.length !== 1) { | 892 if (tests.length !== 1) { |
| 885 chrome.test.notifyFail('Test not found ' + args.test); | 893 chrome.test.notifyFail('Test not found ' + args.test); |
| 886 return; | 894 return; |
| 887 } | 895 } |
| 888 | 896 |
| 889 chrome.test.runTests(tests); | 897 chrome.test.runTests(tests); |
| 890 }); | 898 }); |
| OLD | NEW |