michael@0: /* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /** michael@0: * Test with sessionCheckpoints.json containing invalid JSON data michael@0: */ michael@0: add_task(function test_invalid_file() { michael@0: // Write bogus data to checkpoint file michael@0: let data = "[}"; michael@0: yield OS.File.writeAtomic(sessionCheckpointsPath, data, michael@0: {tmpPath: sessionCheckpointsPath + ".tmp"}); michael@0: michael@0: CrashMonitor.init(); michael@0: let checkpoints = yield CrashMonitor.previousCheckpoints; michael@0: do_check_eq(checkpoints, null); michael@0: });