mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1126198 - Part 2: Add test coverage to ensure that 'presentationType' is only available in STK_CMD_SELECT_ITEM. r=echen
This commit is contained in:
parent
aa3666273e
commit
de1f1c4471
@ -217,6 +217,7 @@ function testSelectItem(aCommand, aExpect) {
|
||||
is(aCommand.typeOfCommand, MozIccManager.STK_CMD_SELECT_ITEM, "typeOfCommand");
|
||||
is(aCommand.commandQualifier, aExpect.commandQualifier, "commandQualifier");
|
||||
is(aCommand.options.title, aExpect.title, "options.title");
|
||||
is(aCommand.options.presentationType, aCommand.commandQualifier & 0x03, "presentationType");
|
||||
|
||||
for (let index in aExpect.items) {
|
||||
let item = aCommand.options.items[index];
|
||||
|
@ -158,6 +158,8 @@ function testSetupMenu(aCommand, aExpect) {
|
||||
is(aCommand.typeOfCommand, MozIccManager.STK_CMD_SET_UP_MENU, "typeOfCommand");
|
||||
is(aCommand.commandQualifier, aExpect.commandQualifier, "commandQualifier");
|
||||
is(aCommand.options.title, aExpect.title, "options.title");
|
||||
// To ensure that 'presentationType' will only be available in SELECT_ITEM.
|
||||
is(aCommand.options.presentationType, undefined, "presentationType");
|
||||
|
||||
for (let index in aExpect.items) {
|
||||
let item = aCommand.options.items[index];
|
||||
|
@ -725,7 +725,6 @@ add_test(function test_icc_notify_stk_proactive_command() {
|
||||
{ identifier: 0x02, text: "Menu Item 2" },
|
||||
{ identifier: 0x03, text: "Menu Item 3" }
|
||||
],
|
||||
presentationType: RIL.STK_PRESENTATION_TYPE_NOT_SPECIFIED,
|
||||
isHelpAvailable: true
|
||||
}
|
||||
},
|
||||
@ -762,7 +761,6 @@ add_test(function test_icc_notify_stk_proactive_command() {
|
||||
],
|
||||
iconSelfExplanatory: false,
|
||||
icons: [basicIcon, colorIcon, colorTransparencyIcon],
|
||||
presentationType: RIL.STK_PRESENTATION_TYPE_NOT_SPECIFIED,
|
||||
isHelpAvailable: false
|
||||
}
|
||||
},
|
||||
@ -777,6 +775,7 @@ add_test(function test_icc_notify_stk_proactive_command() {
|
||||
{ identifier: 0x02, text: "Menu Item 2" },
|
||||
{ identifier: 0x03, text: "Menu Item 3" }
|
||||
],
|
||||
presentationType: RIL.STK_PRESENTATION_TYPE_NOT_SPECIFIED,
|
||||
isHelpAvailable: false
|
||||
}
|
||||
},
|
||||
@ -814,6 +813,7 @@ add_test(function test_icc_notify_stk_proactive_command() {
|
||||
defaultItem: 0x02,
|
||||
iconSelfExplanatory: false,
|
||||
icons: [basicIcon, colorIcon, colorTransparencyIcon],
|
||||
presentationType: RIL.STK_PRESENTATION_TYPE_NAVIGATION_OPTIONS,
|
||||
isHelpAvailable: false
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user