diff options
Diffstat (limited to 'devtools/client/inspector/rules/test/browser_rules_keyframeLineNumbers.js')
-rw-r--r-- | devtools/client/inspector/rules/test/browser_rules_keyframeLineNumbers.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/devtools/client/inspector/rules/test/browser_rules_keyframeLineNumbers.js b/devtools/client/inspector/rules/test/browser_rules_keyframeLineNumbers.js new file mode 100644 index 0000000000..98b0452a9b --- /dev/null +++ b/devtools/client/inspector/rules/test/browser_rules_keyframeLineNumbers.js @@ -0,0 +1,24 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +// Test that editing a rule will update the line numbers of subsequent +// rules in the rule view. + +const TESTCASE_URI = URL_ROOT + "doc_keyframeLineNumbers.html"; + +add_task(async function () { + await addTab(TESTCASE_URI); + const { inspector, view } = await openRuleView(); + await selectNode("#outer", inspector); + + info("Insert a new property, which will affect the line numbers"); + await addProperty(view, 1, "font-size", "72px"); + + await selectNode("#inner", inspector); + + const value = getRuleViewLinkTextByIndex(view, 3); + // Note that this is relative to the <style>. + is(value.slice(-3), ":27", "rule line number is 27"); +}); |