"use strict";
// Copyright 2025 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
Object.defineProperty(exports, "__esModule", { value: true });
const chai_1 = require("chai");
const performance_helpers_js_1 = require("../helpers/performance-helpers.js");
describe('RPP supporting multiple traces', () => {
    setup({ dockingMode: 'undocked' });
    it('updates the UI when a new trace is imported', async ({ devToolsPage, inspectedPage }) => {
        await (0, performance_helpers_js_1.navigateToPerformanceTab)(undefined, devToolsPage, inspectedPage);
        await (0, performance_helpers_js_1.uploadTraceFile)(devToolsPage, 'test/e2e/resources/performance/timeline/web.dev-trace.json.gz');
        const firstTimings = await devToolsPage.waitFor('.summary-range');
        const firstTimingsText = await firstTimings.evaluate(t => t.innerText.replace(/\s/g, ''));
        chai_1.assert.strictEqual(firstTimingsText, 'Range:547ms–1.78s');
        await (0, performance_helpers_js_1.uploadTraceFile)(devToolsPage, 'test/e2e/resources/performance/timeline/treeView-test-trace.json');
        const secondTimings = await devToolsPage.waitFor('.summary-range');
        const secondTimingsText = await secondTimings.evaluate(t => t.innerText.replace(/\s/g, ''));
        chai_1.assert.strictEqual(secondTimingsText, 'Range:0ms–867ms');
    });
});
//# sourceMappingURL=multiple-traces.test.js.map