1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
5 * Tests that the profile service refuses to flush when the install.ini file
9 function check_unchanged(service) {
11 !service.isListOutdated,
12 "Should not have detected a modification."
16 Assert.ok(true, "Should have flushed.");
18 Assert.ok(false, "Should have succeeded flushing.");
22 add_task(async () => {
23 let service = getProfileService();
25 Assert.ok(!service.isListOutdated, "Should not be modified yet.");
27 let installsini = gDataHome.clone();
28 installsini.append("installs.ini");
30 Assert.ok(!installsini.exists(), "File should not exist yet.");
31 installsini.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o644);
33 installsini.remove(false);
34 // We have to do profile selection to actually have any install data.
35 selectStartupProfile();
36 check_unchanged(service);
38 // We can't reset the modification time back to exactly what it was, so I
39 // guess we can't do much more here :(