blob: 6f3c48bf8c33a2996e23ebd20a87096d9f581d0a [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult(`Verifies that large rules are truncated and can be fully expanded.\n`);
await TestRunner.loadModule('elements_test_runner');
await TestRunner.showPanel('elements');
var ruleText = '\n';
for (var i = 0; i < 200; i++)
ruleText += '--var-' + i + ': ' + i + 'px;\n';
await TestRunner.loadHTML(`
<style>
#inspected {${ruleText}}
</style>
<div id="inspected">Text</div>
`);
await new Promise(x => ElementsTestRunner.selectNodeAndWaitForStyles('inspected', x));
TestRunner.addResult('Before showing all properties:')
await ElementsTestRunner.dumpSelectedElementStyles(true, false, true);
TestRunner.addResult('After showing all properties:')
ElementsTestRunner.firstMatchedStyleSection()._showAllButton.click();
await ElementsTestRunner.dumpSelectedElementStyles(true, false, true);
TestRunner.completeTest();
})();