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

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

Issue 1019033002: Add an ONC property for the third-party VPN provider extension ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed browser tests. Created 5 years, 9 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 "WiFi": { 224 "WiFi": {
225 "Security": "WEP-PSK", 225 "Security": "WEP-PSK",
226 "SignalStrength": 40 226 "SignalStrength": 40
227 } 227 }
228 }, 228 },
229 { 229 {
230 "Connectable": true, 230 "Connectable": true,
231 "ConnectionState": "Connected", 231 "ConnectionState": "Connected",
232 "GUID": "stub_wimax_guid", 232 "GUID": "stub_wimax_guid",
233 "Name": "wimax", 233 "Name": "wimax",
234 "Source":"User", 234 "Source": "User",
235 "Type": "WiMAX", 235 "Type": "WiMAX",
236 "WiMAX": { 236 "WiMAX": {
237 "SignalStrength": 40 237 "SignalStrength": 40
238 } 238 }
239 }, 239 },
240 { 240 {
241 "ConnectionState": "Connected", 241 "ConnectionState": "Connected",
242 "GUID": "stub_vpn1_guid", 242 "GUID": "stub_vpn1_guid",
243 "Name": "vpn1", 243 "Name": "vpn1",
244 "Source":"User", 244 "Source": "User",
245 "Type": "VPN" 245 "Type": "VPN",
246 "VPN": {
247 "Type":"OpenVPN"
248 }
249 },
250 {
251 "ConnectionState": "NotConnected",
252 "GUID": "stub_vpn2_guid",
253 "Name": "vpn2",
254 "Source": "User",
255 "Type": "VPN",
256 "VPN": {
257 "ThirdPartyVPN": {
258 "ExtensionID": "third_party_provider_extension_id"
259 },
260 "Type": "ThirdPartyVPN"
261 }
246 }, 262 },
247 { 263 {
248 "Connectable": true, 264 "Connectable": true,
249 "ConnectionState": "NotConnected", 265 "ConnectionState": "NotConnected",
250 "GUID": "stub_wifi2_guid", 266 "GUID": "stub_wifi2_guid",
251 "Name": "wifi2_PSK", 267 "Name": "wifi2_PSK",
252 "Source": "User", 268 "Source": "User",
253 "Type": "WiFi", 269 "Type": "WiFi",
254 "WiFi": { 270 "WiFi": {
255 "Security": "WPA-PSK", 271 "Security": "WPA-PSK",
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } 304 }
289 ], result); 305 ], result);
290 })); 306 }));
291 }, 307 },
292 function requestNetworkScan() { 308 function requestNetworkScan() {
293 // Connected or Connecting networks should be listed first, sorted by type. 309 // Connected or Connecting networks should be listed first, sorted by type.
294 var expected = ["stub_ethernet_guid", 310 var expected = ["stub_ethernet_guid",
295 "stub_wifi1_guid", 311 "stub_wifi1_guid",
296 "stub_wimax_guid", 312 "stub_wimax_guid",
297 "stub_vpn1_guid", 313 "stub_vpn1_guid",
314 "stub_vpn2_guid",
298 "stub_wifi2_guid"]; 315 "stub_wifi2_guid"];
299 var done = chrome.test.callbackAdded(); 316 var done = chrome.test.callbackAdded();
300 var listener = new privateHelpers.listListener(expected, done); 317 var listener = new privateHelpers.listListener(expected, done);
301 chrome.networkingPrivate.onNetworkListChanged.addListener( 318 chrome.networkingPrivate.onNetworkListChanged.addListener(
302 listener.listenForChanges); 319 listener.listenForChanges);
303 chrome.networkingPrivate.requestNetworkScan(); 320 chrome.networkingPrivate.requestNetworkScan();
304 }, 321 },
305 function getProperties() { 322 function getProperties() {
306 chrome.networkingPrivate.getProperties( 323 chrome.networkingPrivate.getProperties(
307 "stub_wifi1_guid", 324 "stub_wifi1_guid",
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 new privateHelpers.watchForStateChanges(network, expectedStates, done); 534 new privateHelpers.watchForStateChanges(network, expectedStates, done);
518 chrome.networkingPrivate.startDisconnect(network, callbackPass()); 535 chrome.networkingPrivate.startDisconnect(network, callbackPass());
519 }, 536 },
520 function onNetworkListChangedEvent() { 537 function onNetworkListChangedEvent() {
521 // Connecting to wifi2 should set wifi1 to offline. Connected or Connecting 538 // Connecting to wifi2 should set wifi1 to offline. Connected or Connecting
522 // networks should be listed first, sorted by type. 539 // networks should be listed first, sorted by type.
523 var expected = ["stub_ethernet_guid", 540 var expected = ["stub_ethernet_guid",
524 "stub_wifi2_guid", 541 "stub_wifi2_guid",
525 "stub_wimax_guid", 542 "stub_wimax_guid",
526 "stub_vpn1_guid", 543 "stub_vpn1_guid",
527 "stub_wifi1_guid"]; 544 "stub_wifi1_guid",
545 "stub_vpn2_guid"];
528 var done = chrome.test.callbackAdded(); 546 var done = chrome.test.callbackAdded();
529 var listener = new privateHelpers.listListener(expected, done); 547 var listener = new privateHelpers.listListener(expected, done);
530 chrome.networkingPrivate.onNetworkListChanged.addListener( 548 chrome.networkingPrivate.onNetworkListChanged.addListener(
531 listener.listenForChanges); 549 listener.listenForChanges);
532 var network = "stub_wifi2_guid"; 550 var network = "stub_wifi2_guid";
533 chrome.networkingPrivate.startConnect(network, callbackPass()); 551 chrome.networkingPrivate.startConnect(network, callbackPass());
534 }, 552 },
535 function verifyDestination() { 553 function verifyDestination() {
536 chrome.networkingPrivate.verifyDestination( 554 chrome.networkingPrivate.verifyDestination(
537 verificationProperties, 555 verificationProperties,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 new privateHelpers.watchForCaptivePortalState( 611 new privateHelpers.watchForCaptivePortalState(
594 'wifi_guid', 'Online', done); 612 'wifi_guid', 'Online', done);
595 chrome.test.sendMessage('notifyPortalDetectorObservers'); 613 chrome.test.sendMessage('notifyPortalDetectorObservers');
596 }, 614 },
597 ]; 615 ];
598 616
599 var testToRun = window.location.search.substring(1); 617 var testToRun = window.location.search.substring(1);
600 chrome.test.runTests(availableTests.filter(function(op) { 618 chrome.test.runTests(availableTests.filter(function(op) {
601 return op.name == testToRun; 619 return op.name == testToRun;
602 })); 620 }));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698