commit 8f007ee060a8079c9ee1e4493e128fa61118ed31
parent de5b78e28b9eaea3ebc507784e07a9730d2e50b4
Author: Sandor Molnar <smolnar@mozilla.com>
Date: Thu, 13 Nov 2025 13:45:34 +0200
Revert "Bug 1998626 - [devtools] Add test for markup search for pseudo elements. r=devtools-reviewers,bomsy." for causing dt failures @ browser_computed_inherited-element-backed-pseudo-elements.js
This reverts commit d0e113a6419211369bb592557e29c4b311ad0c81.
Diffstat:
6 files changed, 1 insertion(+), 68 deletions(-)
diff --git a/devtools/client/inspector/markup/markup.js b/devtools/client/inspector/markup/markup.js
@@ -1174,7 +1174,6 @@ class MarkupView extends EventEmitter {
// If there's no selected container, or if the search is empty, we don't have anything
// to highlight.
if (!this._selectedContainer || !searchQuery) {
- this.emitForTests("search-results-highlighting-updated");
return;
}
@@ -1245,7 +1244,6 @@ class MarkupView extends EventEmitter {
false
);
}
- this.emitForTests("search-results-highlighting-updated");
}
/**
diff --git a/devtools/client/inspector/markup/test/browser.toml b/devtools/client/inspector/markup/test/browser.toml
@@ -19,7 +19,6 @@ support-files = [
"doc_markup_pagesize_01.html",
"doc_markup_pagesize_02.html",
"doc_markup_pseudo.html",
- "doc_markup_search.css",
"doc_markup_search.html",
"doc_markup_subgrid.html",
"doc_markup_svg_attributes.html",
diff --git a/devtools/client/inspector/markup/test/browser_markup_search_01.js b/devtools/client/inspector/markup/test/browser_markup_search_01.js
@@ -214,51 +214,6 @@ add_task(async function () {
markupViewContainer.clientWidth,
"Markup view overflows horizontally"
);
-
- info("Search for pseudo elements");
-
- await searchInMarkupView(inspector, "::before");
- is(
- inspector.selection.nodeFront.displayName,
- "::before",
- "The ::before element is selected"
- );
- checkHighlightedSearchResults(inspector, ["::before"]);
-
- await searchInMarkupView(inspector, "::after");
- is(
- inspector.selection.nodeFront.displayName,
- "::after",
- "The ::after element is selected"
- );
- checkHighlightedSearchResults(inspector, ["::after"]);
-
- await searchInMarkupView(inspector, "::marker");
- is(
- inspector.selection.nodeFront.displayName,
- "::marker",
- "The ::marker element is selected"
- );
- checkHighlightedSearchResults(inspector, ["::marker"]);
-
- // Search by the `content` declaration of the ::before and ::after pseudo elements
- await searchInMarkupView(inspector, "my_before_text");
- is(
- inspector.selection.nodeFront.displayName,
- "::before",
- "The ::before element is selected"
- );
- // no highlighting as the `content` text isn't displayed in the markup view
- checkHighlightedSearchResults(inspector, []);
-
- await searchInMarkupView(inspector, "my_after_text");
- is(
- inspector.selection.nodeFront.displayName,
- "::after",
- "The ::after element is selected"
- );
- // no highlighting as the `content` text isn't displayed in the markup view
- checkHighlightedSearchResults(inspector, []);
});
function checkHighlightedSearchResults(inspector, expectedHighlights) {
diff --git a/devtools/client/inspector/markup/test/doc_markup_search.css b/devtools/client/inspector/markup/test/doc_markup_search.css
@@ -1,8 +0,0 @@
-.pseudos {
- &::before {
- content: "my_before_text";
- }
- &::after {
- content: "my_after_text";
- }
-}
diff --git a/devtools/client/inspector/markup/test/doc_markup_search.html b/devtools/client/inspector/markup/test/doc_markup_search.html
@@ -1,10 +1,6 @@
<!DOCTYPE html>
<html>
-<head>
- <style>
- @import url("doc_markup_search.css");
- </style>
-</head>
+<head></head>
<body>
<ul>
<li>
@@ -21,7 +17,6 @@
thisisaverylongtextnodesowegetthemarkupviewtooverflowhorizontallythisisaverylongtextnodesowegetthemarkupviewtooverflowhorizontallythisisaverylongtextnodesowegetthemarkupviewtooverflowhorizontallyOVERFLOWSMATCH
</section>
<section id="cropped-attribute"></section>
- <section class="pseudos">|</section>
<script>
"use strict";
diff --git a/devtools/client/inspector/test/shared-head.js b/devtools/client/inspector/test/shared-head.js
@@ -1200,9 +1200,6 @@ async function searchInMarkupView(inspector, search) {
const onNewNodeFront = inspector.selection.once("new-node-front");
const onSearchResult = inspector.search.once("search-result");
- const onSearchResultHighlightingUpdated = inspector.markup.once(
- "search-results-highlighting-updated"
- );
EventUtils.sendKey("return", inspector.panelWin);
info("Wait for search-result");
@@ -1210,7 +1207,4 @@ async function searchInMarkupView(inspector, search) {
info("Wait for new node being selected");
await onNewNodeFront;
-
- info("Wait for the search results highlighted to be updated");
- await onSearchResultHighlightingUpdated;
}