From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- .../highlight-pseudo-elements.mjs | 16 ++++++++++++++++ .../chrome/test_inspector-inactive-property-helper.html | 3 +++ 2 files changed, 19 insertions(+) (limited to 'devtools/server/tests') 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"; -- cgit v1.2.3