Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
1 /* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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 file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /**
7 * Test with sessionCheckpoints.json containing invalid JSON data
8 */
9 add_task(function test_invalid_file() {
10 // Write bogus data to checkpoint file
11 let data = "[}";
12 yield OS.File.writeAtomic(sessionCheckpointsPath, data,
13 {tmpPath: sessionCheckpointsPath + ".tmp"});
15 CrashMonitor.init();
16 let checkpoints = yield CrashMonitor.previousCheckpoints;
17 do_check_eq(checkpoints, null);
18 });