mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
34 lines
835 B
JavaScript
34 lines
835 B
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
MARIONETTE_TIMEOUT = 60000;
|
|
MARIONETTE_HEAD_JS = "head.js";
|
|
|
|
// The emulator's hard coded iccid value.
|
|
const ICCID = "89014103211118510720";
|
|
|
|
function setRadioEnabledAndWaitIccChange(aEnabled) {
|
|
let promises = [];
|
|
promises.push(waitForManagerEvent("iccchange"));
|
|
promises.push(setRadioEnabled(aEnabled));
|
|
|
|
return Promise.all(promises);
|
|
}
|
|
|
|
// Start tests
|
|
startTestCommon(function() {
|
|
log("Test initial iccId");
|
|
is(mobileConnection.iccId, ICCID);
|
|
|
|
return setRadioEnabledAndWaitIccChange(false)
|
|
.then(() => {
|
|
is(mobileConnection.iccId, null);
|
|
})
|
|
|
|
// Restore radio state.
|
|
.then(() => setRadioEnabledAndWaitIccChange(true))
|
|
.then(() => {
|
|
is(mobileConnection.iccId, ICCID);
|
|
});
|
|
});
|