blob: 51bf034e41072394587c6172441ea1e0a3d48c7f [file] [log] [blame]
// Copyright 2017 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(`Tests that adding a new rule with invalid selector works as expected.\n`);
await TestRunner.loadModule('elements_test_runner');
await TestRunner.showPanel('elements');
await TestRunner.loadHTML(`
<div id="inspected">Text</div>
`);
TestRunner.runTestSuite([
function init(next) {
ElementsTestRunner.selectNodeAndWaitForStyles('inspected', next);
},
function keyframesRuleSelector(next) {
ElementsTestRunner.addNewRule('@-webkit-keyframes shake', callback);
async function callback() {
await ElementsTestRunner.dumpSelectedElementStyles(true, false, true);
next();
}
}
]);
})();