"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 elements_helpers_js_1 = require("../helpers/elements-helpers.js");
describe('Elements DOM Breakpoints section', () => {
    it('avoids duplication and persists DOM breakpoint state between page reloads', async ({ devToolsPage, inspectedPage }) => {
        await (0, elements_helpers_js_1.goToResourceAndWaitForStyleSection)('empty.html', devToolsPage, inspectedPage);
        await (0, elements_helpers_js_1.setDOMBreakpointOnSelectedNode)('subtree modifications', devToolsPage);
        await (0, elements_helpers_js_1.waitForElementsDOMBreakpointsSection)(devToolsPage);
        const breakpoints = await devToolsPage.$$('.breakpoint-entry');
        chai_1.assert.lengthOf(breakpoints, 1);
        chai_1.assert.isTrue(await (0, elements_helpers_js_1.isDOMBreakpointEnabled)(breakpoints[0], devToolsPage));
        // Disable the DOM breakpoint
        await (0, elements_helpers_js_1.toggleDOMBreakpointCheckbox)(breakpoints[0], false, devToolsPage);
        // Reload the test page and validate the DOM breakpoint is still disabled
        await inspectedPage.reload();
        await (0, elements_helpers_js_1.waitForElementsDOMBreakpointsSection)(devToolsPage);
        const newBreakpoints = await devToolsPage.$$('.breakpoint-entry');
        chai_1.assert.lengthOf(newBreakpoints, 1);
        chai_1.assert.isFalse(await (0, elements_helpers_js_1.isDOMBreakpointEnabled)(newBreakpoints[0], devToolsPage));
    });
});
//# sourceMappingURL=dom-breakpoints.test.js.map