"use strict";
// Copyright 2023 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 sources_helpers_js_1 = require("../helpers/sources-helpers.js");
describe('The Sources Tab', function () {
    it('sets the breakpoint in the first script for multiple inline scripts', async ({ devToolsPage, inspectedPage }) => {
        await (0, sources_helpers_js_1.openSourceCodeEditorForFile)('inline-scripts.html', 'inline-scripts.html', devToolsPage, inspectedPage);
        await (0, sources_helpers_js_1.addBreakpointForLine)(4, devToolsPage);
        await (0, sources_helpers_js_1.addBreakpointForLine)(11, devToolsPage);
        void inspectedPage.reload();
        await devToolsPage.waitFor(sources_helpers_js_1.PAUSE_INDICATOR_SELECTOR);
        let names = await (0, sources_helpers_js_1.getCallFrameNames)(devToolsPage);
        chai_1.assert.strictEqual(names[0], 'f1');
        await devToolsPage.click(sources_helpers_js_1.RESUME_BUTTON);
        await devToolsPage.waitForElementWithTextContent('f4inline-scripts.html:11');
        names = await (0, sources_helpers_js_1.getCallFrameNames)(devToolsPage);
        chai_1.assert.strictEqual(names[0], 'f4');
    });
});
//# sourceMappingURL=inline-scripts.test.js.map