fune/toolkit/profile/xpcshell/test_snap_empty.js
Victor Porof 463c2994cb Bug 1561435 - Format toolkit/profile/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36058

--HG--
extra : source : fbfc0ec0d915eb554382401ed6b6f28f1d001f92
2019-07-05 11:17:27 +02:00

28 lines
778 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/*
* Tests that from a clean slate snap builds create an appropriate profile.
*/
add_task(async () => {
simulateSnapEnvironment();
let service = getProfileService();
let { profile, didCreate } = selectStartupProfile();
checkStartupReason("firstrun-created-default");
Assert.ok(didCreate, "Should have created a new profile.");
Assert.equal(
profile.name,
PROFILE_DEFAULT,
"Should have used the normal name."
);
if (AppConstants.MOZ_DEV_EDITION) {
Assert.equal(service.profileCount, 2, "Should be two profiles.");
} else {
Assert.equal(service.profileCount, 1, "Should be only one profile.");
}
checkProfileService();
});