"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 console_helpers_js_1 = require("../helpers/console-helpers.js");
const settings_helpers_js_1 = require("../helpers/settings-helpers.js");
describe('Browser', () => {
    it('can reload a website after all closeable tools are closed', async ({ devToolsPage, inspectedPage }) => {
        // Navigate to website
        await inspectedPage.goToResource('cross_tool/default.html');
        // Open a few closeable panels
        await (0, settings_helpers_js_1.openPanelViaMoreTools)('Animations', devToolsPage);
        await (0, settings_helpers_js_1.openPanelViaMoreTools)('Rendering', devToolsPage);
        const messages = await (0, console_helpers_js_1.getCurrentConsoleMessages)(false, undefined, undefined, devToolsPage);
        await devToolsPage.closeAllCloseableTabs();
        await inspectedPage.reload();
        // Website logs the Date, so it shouldn't be the same
        const newMessages = await (0, console_helpers_js_1.getCurrentConsoleMessages)(false, undefined, undefined, devToolsPage);
        chai_1.assert.notDeepEqual(messages, newMessages);
    });
    it('can navigate to a new website after all closeable tools are closed', async ({ devToolsPage, inspectedPage }) => {
        // Navigate to website
        const targetUrl = 'cross_tool/default.html';
        const secondTargetUrl = 'cross_tool/site_with_errors.html';
        await inspectedPage.goToResource(targetUrl);
        // Open a few closeable panels
        await (0, settings_helpers_js_1.openPanelViaMoreTools)('Animations', devToolsPage);
        await (0, settings_helpers_js_1.openPanelViaMoreTools)('Rendering', devToolsPage);
        await devToolsPage.closeAllCloseableTabs();
        // Navigate to a different website
        await inspectedPage.goToResource(secondTargetUrl);
    });
});
//# sourceMappingURL=browser.test.js.map