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

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: . 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 c0550b3aff182d0a8c066f1eda4cd1ca780c3b13..b86c786f38cd631334d4a95bf85f758648945b0b 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
@@ -424,9 +424,40 @@ var availableTests = [
}, result);
}));
},
+ function setCellularProperties() {
+ var network_guid = 'stub_cellular1_guid';
+ // Make sure we test
pneubeck (no reviews) 2015/03/27 18:26:46 ?
stevenjb 2015/03/27 23:18:04 Oops. Fixed.
+ var newCarrier = 'new_carrier';
+ chrome.networkingPrivate.getProperties(
+ network_guid,
+ callbackPass(function(result) {
+ assertEq(network_guid, result.GUID);
+ assertFalse(result.Cellular && result.Cellular.Carrier == newCarrier);
pneubeck (no reviews) 2015/03/27 18:26:46 assertTrue(result.Cellular && result.Cellular.Carr
stevenjb 2015/03/27 23:18:04 We don't actually care if Cellular exists, we just
+ 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";
+ var network_guid = 'stub_wifi1_guid';
chrome.networkingPrivate.getProperties(
network_guid,
callbackPass(function(result) {
@@ -458,14 +489,12 @@ 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";
+ var network_guid = 'stub_vpn1_guid';
chrome.networkingPrivate.getProperties(
network_guid,
callbackPass(function(result) {
@@ -490,7 +519,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