michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: MARIONETTE_TIMEOUT = 60000; michael@0: MARIONETTE_HEAD_JS = "head.js"; michael@0: michael@0: function check(aLongName, aShortName) { michael@0: let network = mobileConnection.voice.network; michael@0: michael@0: is(network.longName, aLongName, "network.longName"); michael@0: is(network.shortName, aShortName, "network.shortName"); michael@0: is(network.mcc, "310", "network.mcc"); michael@0: is(network.mnc, "260", "network.mnc"); michael@0: } michael@0: michael@0: function test(aLongName, aShortName) { michael@0: log("Testing '" + aLongName + "', '" + aShortName + "':"); michael@0: michael@0: let promises = []; michael@0: promises.push(waitForManagerEvent("voicechange")); michael@0: promises.push(setEmulatorOperatorNames("home", aLongName, aShortName)); michael@0: return Promise.all(promises) michael@0: .then(() => check(aLongName, aShortName)); michael@0: } michael@0: michael@0: startTestCommon(function() { michael@0: return getEmulatorOperatorNames() michael@0: .then(function(aOperators) { michael@0: return Promise.resolve() michael@0: michael@0: .then(() => test("Mozilla", "B2G")) michael@0: .then(() => test("Mozilla", "")) michael@0: .then(() => test("", "B2G")) michael@0: .then(() => test("", "")) michael@0: michael@0: // Reset back to initial values. michael@0: .then(() => test(aOperators[0].longName, aOperators[0].shortName)); michael@0: }); michael@0: });