Bug 1185802 - Part 3: support fota apn type (tests). r=hsinyi

This commit is contained in:
Jessica Jong 2015-07-24 10:41:29 +08:00
parent 3a36aa7c32
commit bb205e177d
4 changed files with 11 additions and 4 deletions

View File

@ -19,7 +19,8 @@ function isNetworkReady() {
SpecialPowers.Ci.nsINetworkInterfaceListService.LIST_NOT_INCLUDE_MMS_INTERFACES |
SpecialPowers.Ci.nsINetworkInterfaceListService.LIST_NOT_INCLUDE_SUPL_INTERFACES |
SpecialPowers.Ci.nsINetworkInterfaceListService.LIST_NOT_INCLUDE_IMS_INTERFACES |
SpecialPowers.Ci.nsINetworkInterfaceListService.LIST_NOT_INCLUDE_DUN_INTERFACES);
SpecialPowers.Ci.nsINetworkInterfaceListService.LIST_NOT_INCLUDE_DUN_INTERFACES |
SpecialPowers.Ci.nsINetworkInterfaceListService.LIST_NOT_INCLUDE_FOTA_INTERFACES);
var num = itfList.getNumberOfInterface();
for (var i = 0; i < num; i++) {
var ips = {};

View File

@ -20,13 +20,15 @@ const NETWORK_TYPE_MOBILE_MMS = Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_MMS;
const NETWORK_TYPE_MOBILE_SUPL = Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_SUPL;
const NETWORK_TYPE_MOBILE_IMS = Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_IMS;
const NETWORK_TYPE_MOBILE_DUN = Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_DUN;
const NETWORK_TYPE_MOBILE_FOTA = Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_FOTA;
const networkTypes = [
NETWORK_TYPE_MOBILE,
NETWORK_TYPE_MOBILE_MMS,
NETWORK_TYPE_MOBILE_SUPL,
NETWORK_TYPE_MOBILE_IMS,
NETWORK_TYPE_MOBILE_DUN
NETWORK_TYPE_MOBILE_DUN,
NETWORK_TYPE_MOBILE_FOTA
];
let Promise = Cu.import("resource://gre/modules/Promise.jsm").Promise;

View File

@ -9,7 +9,7 @@ function setEmulatorAPN() {
[{"carrier":"T-Mobile US",
"apn":"epc.tmobile.com",
"mmsc":"http://mms.msg.eng.t-mobile.com/mms/wapenc",
"types":["default","supl","mms","ims","dun"]}]
"types":["default","supl","mms","ims","dun", "fota"]}]
];
return setSettings(SETTINGS_KEY_DATA_APN_SETTINGS, apn);
@ -57,6 +57,7 @@ function testNonDefaultDataConnection() {
.then(() => doTestNonDefaultDataConnection(NETWORK_TYPE_MOBILE_SUPL))
.then(() => doTestNonDefaultDataConnection(NETWORK_TYPE_MOBILE_IMS))
.then(() => doTestNonDefaultDataConnection(NETWORK_TYPE_MOBILE_DUN))
.then(() => doTestNonDefaultDataConnection(NETWORK_TYPE_MOBILE_FOTA))
// Restore APN settings
.then(() => setSettings(SETTINGS_KEY_DATA_APN_SETTINGS, currentApn));
}

View File

@ -24,7 +24,10 @@ function setEmulatorAPN() {
"types":["ims"] },
{ "carrier":"T-Mobile US",
"apn":"epc5.tmobile.com",
"types":["dun"] }]];
"types":["dun"] },
{ "carrier":"T-Mobile US",
"apn":"epc6.tmobile.com",
"types":["fota"] }]];
return setSettings(SETTINGS_KEY_DATA_APN_SETTINGS, apn);
}