diff options
Diffstat (limited to 'devtools/server/tests/chrome')
-rw-r--r-- | devtools/server/tests/chrome/inactive-property-helper/highlight-pseudo-elements.mjs | 16 | ||||
-rw-r--r-- | devtools/server/tests/chrome/test_inspector-inactive-property-helper.html | 3 |
2 files changed, 19 insertions, 0 deletions
diff --git a/devtools/server/tests/chrome/inactive-property-helper/highlight-pseudo-elements.mjs b/devtools/server/tests/chrome/inactive-property-helper/highlight-pseudo-elements.mjs index bcb5b8763c..05fbefeec5 100644 --- a/devtools/server/tests/chrome/inactive-property-helper/highlight-pseudo-elements.mjs +++ b/devtools/server/tests/chrome/inactive-property-helper/highlight-pseudo-elements.mjs @@ -152,4 +152,20 @@ export default [ rules: ["span::selection { -webkit-text-stroke: 4px navy; }"], isActive: true, }, + { + info: "display is inactive on ::target-text", + property: "display", + tagName: "span", + rules: ["span::target-text { display: grid; }"], + isActive: false, + expectedMsgId: "inactive-css-highlight-pseudo-elements-not-supported", + }, + { + // accept background shorthand, even if it might hold inactive values + info: "background is active on ::target-text", + property: "background", + tagName: "span", + rules: ["span::target-text { background: red; }"], + isActive: true, + }, ]; diff --git a/devtools/server/tests/chrome/test_inspector-inactive-property-helper.html b/devtools/server/tests/chrome/test_inspector-inactive-property-helper.html index c3d9d26aee..7844d49e7b 100644 --- a/devtools/server/tests/chrome/test_inspector-inactive-property-helper.html +++ b/devtools/server/tests/chrome/test_inspector-inactive-property-helper.html @@ -17,17 +17,20 @@ SimpleTest.waitForExplicitFinish(); const CUSTOM_HIGHLIGHT_API = "dom.customHighlightAPI.enabled"; const TEXT_WRAP_BALANCE = "layout.css.text-wrap-balance.enabled"; const ALIGN_CONTENT_BLOCKS = "layout.css.align-content.blocks.enabled"; + const TEXT_FRAGMENTS = "dom.text_fragments.enabled"; Services.prefs.setBoolPref(INACTIVE_CSS_PREF, true); Services.prefs.setBoolPref(CUSTOM_HIGHLIGHT_API, true); Services.prefs.setBoolPref(TEXT_WRAP_BALANCE, true); Services.prefs.setBoolPref(ALIGN_CONTENT_BLOCKS, true); + Services.prefs.setBoolPref(TEXT_FRAGMENTS, true); SimpleTest.registerCleanupFunction(() => { Services.prefs.clearUserPref(INACTIVE_CSS_PREF); Services.prefs.clearUserPref(CUSTOM_HIGHLIGHT_API); Services.prefs.clearUserPref(TEXT_WRAP_BALANCE); Services.prefs.clearUserPref(ALIGN_CONTENT_BLOCKS); + Services.prefs.clearUserPref(TEXT_FRAGMENTS); }); const FOLDER = "./inactive-property-helper"; |