| 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 assertEq = chrome.test.assertEq; | 8 var assertEq = chrome.test.assertEq; |
| 9 | 9 |
| 10 // Test properties for the verification API. | 10 // Test properties for the verification API. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 function startDisconnect() { | 64 function startDisconnect() { |
| 65 // Must connect to a network before we can disconnect from it. | 65 // Must connect to a network before we can disconnect from it. |
| 66 chrome.networkingPrivate.startConnect("stub_wifi2", callbackPass( | 66 chrome.networkingPrivate.startConnect("stub_wifi2", callbackPass( |
| 67 function() { | 67 function() { |
| 68 chrome.networkingPrivate.startDisconnect("stub_wifi2", callbackPass()); | 68 chrome.networkingPrivate.startDisconnect("stub_wifi2", callbackPass()); |
| 69 })); | 69 })); |
| 70 }, | 70 }, |
| 71 function startConnectNonexistent() { | 71 function startConnectNonexistent() { |
| 72 chrome.networkingPrivate.startConnect( | 72 chrome.networkingPrivate.startConnect( |
| 73 "nonexistent_path", | 73 "nonexistent_path", |
| 74 callbackFail("not-found")); | 74 callbackFail("configure-failed")); |
| 75 }, | 75 }, |
| 76 function startDisconnectNonexistent() { | 76 function startDisconnectNonexistent() { |
| 77 chrome.networkingPrivate.startDisconnect( | 77 chrome.networkingPrivate.startDisconnect( |
| 78 "nonexistent_path", | 78 "nonexistent_path", |
| 79 callbackFail("not-found")); | 79 callbackFail("not-found")); |
| 80 }, | 80 }, |
| 81 function startGetPropertiesNonexistent() { | 81 function startGetPropertiesNonexistent() { |
| 82 chrome.networkingPrivate.getProperties( | 82 chrome.networkingPrivate.getProperties( |
| 83 "nonexistent_path", | 83 "nonexistent_path", |
| 84 callbackFail("Error.DBusFailed")); | 84 callbackFail("Error.DBusFailed")); |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 callbackPass(function(result) { | 347 callbackPass(function(result) { |
| 348 assertEq("encrypted_data", result); | 348 assertEq("encrypted_data", result); |
| 349 })); | 349 })); |
| 350 } | 350 } |
| 351 ]; | 351 ]; |
| 352 | 352 |
| 353 var testToRun = window.location.search.substring(1); | 353 var testToRun = window.location.search.substring(1); |
| 354 chrome.test.runTests(availableTests.filter(function(op) { | 354 chrome.test.runTests(availableTests.filter(function(op) { |
| 355 return op.name == testToRun; | 355 return op.name == testToRun; |
| 356 })); | 356 })); |
| OLD | NEW |