// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import { assert } from 'chai';
import { describeWithEnvironment } from '../../testing/EnvironmentHelpers.js';
import { TraceLoader } from '../../testing/TraceLoader.js';
import * as Tracing from './tracing.js';
describeWithEnvironment('FreshRecording', () => {
    it('knows that a recording has been registered as fresh', async function () {
        const instance = Tracing.FreshRecording.Tracker.instance({ forceNew: true });
        const parsedTrace = await TraceLoader.traceEngine(this, 'web-dev.json.gz');
        instance.registerFreshRecording(parsedTrace);
        assert.isTrue(instance.recordingIsFresh(parsedTrace));
    });
    it('knows that un-registered recordings are not fresh', async function () {
        const instance = Tracing.FreshRecording.Tracker.instance({ forceNew: true });
        const parsedTrace = await TraceLoader.traceEngine(this, 'web-dev.json.gz');
        assert.isFalse(instance.recordingIsFresh(parsedTrace));
    });
});
//# sourceMappingURL=FreshRecording.test.js.map