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

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

Issue 2891453002: Introduce networkingPrivate.getCertificateLists (Closed)
Patch Set: Clang format Created 3 years, 7 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
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 // 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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 chrome.networkingPrivate.startConnect(network, networkCallbackPass()); 792 chrome.networkingPrivate.startConnect(network, networkCallbackPass());
793 }, 793 },
794 function onDeviceStateListChangedEvent() { 794 function onDeviceStateListChangedEvent() {
795 var listener = callbackPass(function() { 795 var listener = callbackPass(function() {
796 chrome.networkingPrivate.onDeviceStateListChanged.removeListener( 796 chrome.networkingPrivate.onDeviceStateListChanged.removeListener(
797 listener); 797 listener);
798 }); 798 });
799 chrome.networkingPrivate.onDeviceStateListChanged.addListener(listener); 799 chrome.networkingPrivate.onDeviceStateListChanged.addListener(listener);
800 chrome.networkingPrivate.disableNetworkType('WiFi'); 800 chrome.networkingPrivate.disableNetworkType('WiFi');
801 }, 801 },
802 function onCertificateListsChangedEvent() {
803 chrome.test.listenOnce(
804 chrome.networkingPrivate.onCertificateListsChanged, function() {});
805 chrome.test.sendMessage('eventListenerReady');
806 },
802 function verifyDestination() { 807 function verifyDestination() {
803 chrome.networkingPrivate.verifyDestination( 808 chrome.networkingPrivate.verifyDestination(
804 verificationProperties, 809 verificationProperties,
805 callbackPass(function(isValid) { 810 callbackPass(function(isValid) {
806 assertTrue(isValid); 811 assertTrue(isValid);
807 })); 812 }));
808 }, 813 },
809 function verifyAndEncryptCredentials() { 814 function verifyAndEncryptCredentials() {
810 var network_guid = 'stub_wifi2_guid'; 815 var network_guid = 'stub_wifi2_guid';
811 chrome.networkingPrivate.verifyAndEncryptCredentials( 816 chrome.networkingPrivate.verifyAndEncryptCredentials(
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 })); 969 }));
965 }, 970 },
966 function getTetherNetworkState() { 971 function getTetherNetworkState() {
967 chrome.networkingPrivate.getState( 972 chrome.networkingPrivate.getState(
968 'tetherGuid1', 973 'tetherGuid1',
969 callbackPass(function(tetherNetwork) { 974 callbackPass(function(tetherNetwork) {
970 privateHelpers.verifyTetherNetwork(tetherNetwork, 'tetherGuid1', 975 privateHelpers.verifyTetherNetwork(tetherNetwork, 'tetherGuid1',
971 'tetherName1', 50, 'tetherCarrier1', 75, true); 976 'tetherName1', 50, 'tetherCarrier1', 75, true);
972 })); 977 }));
973 }, 978 },
979 function getCertificateLists() {
980 chrome.networkingPrivate.getCertificateLists(
981 callbackPass(function(certificateLists) {
982 assertEq(1, certificateLists.serverCaCertificates.length);
983 assertEq(0, certificateLists.userCertificates.length);
984 }));
985 },
974 ]; 986 ];
975 987
976 chrome.test.getConfig(function(config) { 988 chrome.test.getConfig(function(config) {
977 var args = JSON.parse(config.customArg); 989 var args = JSON.parse(config.customArg);
978 var tests = availableTests.filter(function(op) { 990 var tests = availableTests.filter(function(op) {
979 return args.test == op.name; 991 return args.test == op.name;
980 }); 992 });
981 if (tests.length !== 1) { 993 if (tests.length !== 1) {
982 chrome.test.notifyFail('Test not found ' + args.test); 994 chrome.test.notifyFail('Test not found ' + args.test);
983 return; 995 return;
984 } 996 }
985 997
986 chrome.test.runTests(tests); 998 chrome.test.runTests(tests);
987 }); 999 });
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc ('k') | chromeos/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698