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

Unified Diff: chrome/test/data/extensions/api_test/networking/test.js

Issue 275543005: Use GUID instead of ServicePath in networkingPrivate API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/networking/test.js
diff --git a/chrome/test/data/extensions/api_test/networking/test.js b/chrome/test/data/extensions/api_test/networking/test.js
index 746a89a38c0559bab2cf48510659698b3297050d..5f569d62876ab83f15d660fe256b82dc78fc4bdb 100644
--- a/chrome/test/data/extensions/api_test/networking/test.js
+++ b/chrome/test/data/extensions/api_test/networking/test.js
@@ -56,12 +56,12 @@ var privateHelpers = {
done();
};
},
- watchForCaptivePortalState: function(expectedNetworkPath,
+ watchForCaptivePortalState: function(expectedGuid,
expectedState,
done) {
var self = this;
- this.onPortalDetectionCompleted = function(networkPath, state) {
- assertEq(expectedNetworkPath, networkPath);
+ this.onPortalDetectionCompleted = function(guid, state) {
+ assertEq(expectedGuid, guid);
assertEq(expectedState, state);
chrome.networkingPrivate.onPortalDetectionCompleted.removeListener(
self.onPortalDetectionCompleted);
@@ -86,17 +86,17 @@ var availableTests = [
function startConnectNonexistent() {
chrome.networkingPrivate.startConnect(
"nonexistent_path",
- callbackFail("configure-failed"));
+ callbackFail("Error.InvalidNetworkGuid"));
pneubeck (no reviews) 2014/05/12 13:37:07 optional nit: the 'Error.' prefix seems superfluou
stevenjb 2014/05/13 01:19:00 Agreed that we should audit these, but in a separa
},
function startDisconnectNonexistent() {
chrome.networkingPrivate.startDisconnect(
"nonexistent_path",
- callbackFail("not-found"));
+ callbackFail("Error.InvalidNetworkGuid"));
},
function startGetPropertiesNonexistent() {
chrome.networkingPrivate.getProperties(
"nonexistent_path",
- callbackFail("Error.DBusFailed"));
+ callbackFail("Error.InvalidNetworkGuid"));
},
function createNetwork() {
chrome.networkingPrivate.createNetwork(
@@ -243,7 +243,11 @@ var availableTests = [
"Active": "NotConnected",
"Effective": "Unmanaged"
},
- "GUID": "stub_wifi2",
+ "GUID": {
+ "Active": "stub_wifi2",
pneubeck (no reviews) 2014/05/12 13:37:07 hm. This should be changed to 'Unmanaged' or to th
stevenjb 2014/05/13 01:19:00 Awesome.
+ "Effective": "UserPolicy",
+ "UserPolicy": "stub_wifi2"
+ },
"Name": {
"Active": "wifi2_PSK",
"Effective": "UserPolicy",
@@ -295,13 +299,17 @@ var availableTests = [
chrome.networkingPrivate.getProperties(
"stub_wifi2",
callbackPass(function(result) {
+ var guid = result.GUID;
pneubeck (no reviews) 2014/05/12 13:37:07 isn't "stub_wifi2" two lines above already the exp
stevenjb 2014/05/13 01:19:00 Done.
result.WiFi.Security = "WEP-PSK";
chrome.networkingPrivate.setProperties("stub_wifi2", result,
callbackPass(function() {
chrome.networkingPrivate.getProperties(
"stub_wifi2",
callbackPass(function(result) {
+ // Ensure that the property was set.
assertEq("WEP-PSK", result.WiFi.Security);
+ // Ensure that the GUID doesn't change.
+ assertEq(guid, result.GUID);
done();
}));
}));
@@ -327,7 +335,7 @@ var availableTests = [
function getStateNonExistent() {
chrome.networkingPrivate.getState(
'non_existent',
- callbackFail('Error.InvalidParameter'));
+ callbackFail('Error.InvalidNetworkGuid'));
},
function onNetworksChangedEventConnect() {
var network = "stub_wifi2";
@@ -367,9 +375,10 @@ var availableTests = [
}));
},
function verifyAndEncryptCredentials() {
+ var network_guid = "stub_wifi2";
chrome.networkingPrivate.verifyAndEncryptCredentials(
verificationProperties,
- "guid",
+ network_guid,
callbackPass(function(result) {
assertEq("encrypted_credentials", result);
}));

Powered by Google App Engine
This is Rietveld 408576698