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

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

Issue 1028243007: Call Device.SetCarrier when the ONC Carrier property is specified. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onc_clang
Patch Set: Fix components_unittests 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/networking_private/chromeos/test.js
diff --git a/chrome/test/data/extensions/api_test/networking_private/chromeos/test.js b/chrome/test/data/extensions/api_test/networking_private/chromeos/test.js
index 876fb3445c884abdaa415289bb7162ce5022f1aa..9d2726875495760f16aeaa51dccb73b44cf0c9db 100644
--- a/chrome/test/data/extensions/api_test/networking_private/chromeos/test.js
+++ b/chrome/test/data/extensions/api_test/networking_private/chromeos/test.js
@@ -461,8 +461,40 @@ var availableTests = [
}, result);
}));
},
+ function setCellularProperties() {
+ var network_guid = 'stub_cellular1_guid';
+ // Make sure we test Cellular.Carrier since it requires a special call
+ // to Shill.Device.SetCarrier.
+ var newCarrier = 'new_carrier';
+ chrome.networkingPrivate.getProperties(
+ network_guid,
+ callbackPass(function(result) {
+ assertEq(network_guid, result.GUID);
+ assertTrue(!result.Cellular || result.Cellular.Carrier != newCarrier);
+ var new_properties = {
+ Priority: 1,
+ Cellular: {
+ Carrier: newCarrier,
+ },
+ };
+ chrome.networkingPrivate.setProperties(
+ network_guid,
+ new_properties,
+ callbackPass(function() {
+ chrome.networkingPrivate.getProperties(
+ network_guid,
+ callbackPass(function(result) {
+ // Ensure that the GUID doesn't change.
+ assertEq(network_guid, result.GUID);
+ // Ensure that the properties were set.
+ assertEq(1, result['Priority']);
+ assertTrue('Cellular' in result);
+ assertEq(newCarrier, result.Cellular.Carrier);
+ }));
+ }));
+ }));
+ },
function setWiFiProperties() {
- var done = chrome.test.callbackAdded();
var network_guid = 'stub_wifi1_guid';
chrome.networkingPrivate.getProperties(
network_guid,
@@ -495,13 +527,11 @@ var availableTests = [
assertTrue('StaticIPConfig' in result);
assertEq('1.2.3.4',
result['StaticIPConfig']['IPAddress']);
- done();
}));
}));
}));
},
function setVPNProperties() {
- var done = chrome.test.callbackAdded();
var network_guid = 'stub_vpn1_guid';
chrome.networkingPrivate.getProperties(
network_guid,
@@ -527,7 +557,6 @@ var availableTests = [
assertEq('vpn.host1', result['VPN']['Host']);
// Ensure that the GUID doesn't change.
assertEq(network_guid, result.GUID);
- done();
}));
}));
}));

Powered by Google App Engine
This is Rietveld 408576698