blob: d03bcd9e637a086fa0fa8eeeb7757b76ce3d20db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Test that a CSS property is marked as inactive when a condition
// changes in other CSS rule matching the element.
const TEST_URI = `
<style>
.display {
display: grid;
}
.gap {
gap: 1em;
}
</style>
<div class="display gap">`;
add_task(async function () {
await pushPref("devtools.inspector.inactive.css.enabled", true);
await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
const { inspector, view } = await openRuleView();
await selectNode("div", inspector);
await checkDeclarationIsActive(view, 1, { gap: "1em" });
await toggleDeclaration(view, 2, { display: "grid" });
await checkDeclarationIsInactive(view, 1, { gap: "1em" });
});
|