Bug 984327 - Part 2: Modify test cases for dun. r=vicamo

This commit is contained in:
Jessica Jong 2014-03-19 08:39:00 -04:00
parent 9908262450
commit e588a7fc25
2 changed files with 7 additions and 3 deletions

View File

@ -336,7 +336,9 @@ function isNetworkReady() {
.getService(SpecialPowers.Ci.nsINetworkInterfaceListService);
var itfList = listService.getDataInterfaceList(
SpecialPowers.Ci.nsINetworkInterfaceListService.LIST_NOT_INCLUDE_MMS_INTERFACES |
SpecialPowers.Ci.nsINetworkInterfaceListService.LIST_NOT_INCLUDE_SUPL_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);
var num = itfList.getNumberOfInterface();
for (var i = 0; i < num; i++) {
if (itfList.getInterface(i).ip) {

View File

@ -59,7 +59,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"]}]
"types":["default","supl","mms","ims","dun"]}]
];
return setSetting(APN_KEY, apn);
@ -155,7 +155,8 @@ function testNonDefaultDataConnection() {
let typeMapping = {
"mms": Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_MMS,
"supl": Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_SUPL,
"ims": Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_IMS
"ims": Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_IMS,
"dun": Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_DUN
};
let networkType = typeMapping[type];
@ -176,6 +177,7 @@ function testNonDefaultDataConnection() {
.then(() => doTestNonDefaultDataConnection("mms"))
.then(() => doTestNonDefaultDataConnection("supl"))
.then(() => doTestNonDefaultDataConnection("ims"))
.then(() => doTestNonDefaultDataConnection("dun"))
// Restore APN settings
.then(() => setSetting(APN_KEY, currentApn))
.then(null, () => {