2014-06-12 13:49:20 +04:00
|
|
|
/* Any copyright is dedicated to the Public Domain.
|
|
|
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
|
2014-07-02 15:28:33 +04:00
|
|
|
MARIONETTE_TIMEOUT = 10000;
|
2014-06-12 13:49:20 +04:00
|
|
|
MARIONETTE_HEAD_JS = 'head.js';
|
|
|
|
|
2014-07-02 15:28:33 +04:00
|
|
|
function testReceiving_MultiSIM() {
|
|
|
|
log("Test receiving GSM Cell Broadcast - Multi-SIM");
|
|
|
|
|
|
|
|
let pdu = buildHexStr(0, CB_MESSAGE_SIZE_GSM * 2);
|
2014-06-12 13:49:20 +04:00
|
|
|
|
|
|
|
let verifyCBMessage = (aMessage, aServiceId) => {
|
|
|
|
log("Verify CB message received from serviceId: " + aServiceId);
|
2014-07-03 15:56:40 +04:00
|
|
|
is(aMessage.body, DUMMY_BODY_7BITS, "Checking message body.");
|
2014-06-12 13:49:20 +04:00
|
|
|
is(aMessage.serviceId, aServiceId, "Checking serviceId.");
|
|
|
|
};
|
|
|
|
|
|
|
|
return selectModem(1)
|
2014-07-02 15:28:33 +04:00
|
|
|
.then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
|
|
|
|
.then((aMessage) => verifyCBMessage(aMessage, 1))
|
2014-06-12 13:49:20 +04:00
|
|
|
.then(() => selectModem(0))
|
2014-07-02 15:28:33 +04:00
|
|
|
.then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
|
|
|
|
.then((aMessage) => verifyCBMessage(aMessage, 0));
|
2014-06-12 13:49:20 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
startTestCommon(function testCaseMain() {
|
2014-07-02 15:28:33 +04:00
|
|
|
return runIfMultiSIM(testReceiving_MultiSIM);
|
2014-06-12 13:49:20 +04:00
|
|
|
});
|