mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 908075 - Part2: USER_ACTIVITY stk event xpcshell test. r=yoshi
This commit is contained in:
parent
e5b75a3888
commit
fdd5639b07
@ -878,6 +878,54 @@ add_test(function test_stk_event_download_language_selection() {
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Verify Event Download Command : User Activity
|
||||
*/
|
||||
add_test(function test_stk_event_download_user_activity() {
|
||||
let worker = newUint8SupportOutgoingIndexWorker();
|
||||
let buf = worker.Buf;
|
||||
let pduHelper = worker.GsmPDUHelper;
|
||||
|
||||
buf.sendParcel = function () {
|
||||
// Type
|
||||
do_check_eq(this.readUint32(), REQUEST_STK_SEND_ENVELOPE_COMMAND);
|
||||
|
||||
// Token : we don't care
|
||||
this.readUint32();
|
||||
|
||||
// Data Size, 18 = 2 * (2 + TLV_DEVICE_ID_SIZE(4) + TLV_EVENT_LIST_SIZE(3))
|
||||
do_check_eq(this.readUint32(), 18);
|
||||
|
||||
// BER tag
|
||||
do_check_eq(pduHelper.readHexOctet(), BER_EVENT_DOWNLOAD_TAG);
|
||||
|
||||
// BER length, 7 = TLV_DEVICE_ID_SIZE(4) + TLV_EVENT_LIST_SIZE(3)
|
||||
do_check_eq(pduHelper.readHexOctet(), 7);
|
||||
|
||||
// Device Identities, Type-Length-Value(Source ID-Destination ID)
|
||||
do_check_eq(pduHelper.readHexOctet(), COMPREHENSIONTLV_TAG_DEVICE_ID |
|
||||
COMPREHENSIONTLV_FLAG_CR);
|
||||
do_check_eq(pduHelper.readHexOctet(), 2);
|
||||
do_check_eq(pduHelper.readHexOctet(), STK_DEVICE_ID_ME);
|
||||
do_check_eq(pduHelper.readHexOctet(), STK_DEVICE_ID_SIM);
|
||||
|
||||
// Event List, Type-Length-Value
|
||||
do_check_eq(pduHelper.readHexOctet(), COMPREHENSIONTLV_TAG_EVENT_LIST |
|
||||
COMPREHENSIONTLV_FLAG_CR);
|
||||
do_check_eq(pduHelper.readHexOctet(), 1);
|
||||
do_check_eq(pduHelper.readHexOctet(), STK_EVENT_TYPE_USER_ACTIVITY);
|
||||
|
||||
run_next_test();
|
||||
};
|
||||
|
||||
let event = {
|
||||
eventType: STK_EVENT_TYPE_USER_ACTIVITY
|
||||
};
|
||||
worker.RIL.sendStkEventDownload({
|
||||
event: event
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Verify Event Download Command : Idle Screen Available
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user