1 // -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
2 // This Source Code Form is subject to the terms of the Mozilla Public
3 // License, v. 2.0. If a copy of the MPL was not distributed with this
4 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 // Tests that when PSM initializes, we create the sqlite-backed certificate and
11 let profileDir = do_get_profile();
12 let certificateDBFile = profileDir.clone();
13 let certificateDBName = "cert9.db";
14 certificateDBFile.append(certificateDBName);
16 !certificateDBFile.exists(),
17 `${certificateDBName} should not exist beforehand`
19 let keyDBFile = profileDir.clone();
20 let keyDBName = "key4.db";
21 keyDBFile.append(keyDBName);
22 ok(!keyDBFile.exists(), `${keyDBName} should not exist beforehand`);
23 // This should start PSM.
24 Cc["@mozilla.org/psm;1"].getService(Ci.nsISupports);
26 certificateDBFile.exists(),
27 `${certificateDBName} should exist in the profile`
29 ok(keyDBFile.exists(), `${keyDBName} should exist in the profile`);