"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
const security_helpers_js_1 = require("../helpers/security-helpers.js");
describe('The Security Panel', function () {
    setup({ dockingMode: 'bottom' });
    it('is open by default when devtools initializes', async ({ devToolsPage }) => {
        await (0, security_helpers_js_1.navigateToSecurityTab)(devToolsPage);
    });
    it('closes without crashing and stays closed after reloading tools', async ({ devToolsPage }) => {
        await (0, security_helpers_js_1.closeSecurityTab)(devToolsPage);
        await devToolsPage.reload();
        await (0, security_helpers_js_1.securityTabDoesNotExist)(devToolsPage);
    });
    it('appears under More tools after being closed', async ({ devToolsPage }) => {
        await (0, security_helpers_js_1.closeSecurityTab)(devToolsPage);
        await (0, security_helpers_js_1.openSecurityPanelFromMoreTools)(devToolsPage);
        await devToolsPage.reload();
        await (0, security_helpers_js_1.securityTabExists)(devToolsPage);
    });
    it('can be opened from command menu after being closed', async ({ devToolsPage }) => {
        await (0, security_helpers_js_1.closeSecurityTab)(devToolsPage);
        await (0, security_helpers_js_1.openSecurityPanelFromCommandMenu)(devToolsPage);
    });
    it('shows blocked resources in the sidebar', async ({ devToolsPage, inspectedPage }) => {
        await (0, security_helpers_js_1.navigateToSecurityTab)(devToolsPage);
        await inspectedPage.goToResourceWithCustomHost('devtools.test', 'security/mixed-content.html');
        const nonSecureOrigins = await devToolsPage.waitForAria('Non-secure origins');
        await devToolsPage.waitForElementWithTextContent('http://devtools.test', nonSecureOrigins);
    });
});
//# sourceMappingURL=security.test.js.map