[tor-commits] [tor-browser] 173/311: Bug 1721743 - [devtools] Wait for ruleview property in browser_rules_preview-tooltips-sizes.js r=nchevobbe a=test-only DONTBUILD
gitolite role
git at cupani.torproject.org
Tue Apr 26 15:29:33 UTC 2022
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch geckoview-99.0.1-11.0-1
in repository tor-browser.
commit cdf56dc6a8d0b7e404d823003fa3d048db1bc137
Author: Julian Descottes <jdescottes at mozilla.com>
AuthorDate: Wed Mar 16 11:55:26 2022 +0200
Bug 1721743 - [devtools] Wait for ruleview property in browser_rules_preview-tooltips-sizes.js r=nchevobbe a=test-only DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D141106
---
.../test/browser_rules_preview-tooltips-sizes.js | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/devtools/client/inspector/rules/test/browser_rules_preview-tooltips-sizes.js b/devtools/client/inspector/rules/test/browser_rules_preview-tooltips-sizes.js
index f2adde79952e4..cd2d39132f36a 100644
--- a/devtools/client/inspector/rules/test/browser_rules_preview-tooltips-sizes.js
+++ b/devtools/client/inspector/rules/test/browser_rules_preview-tooltips-sizes.js
@@ -23,7 +23,7 @@ add_task(async function() {
--test-var-wider-than-image: red;
}
- div {
+ #target {
color: var(--test-var-wider-than-image);
background: url(${BASE_64_URL});
}
@@ -34,15 +34,26 @@ add_task(async function() {
const { inspector, view } = await openRuleView();
await selectNode("#target", inspector);
+ // Note: See intermittent Bug 1721743.
+ // On linux webrender opt, the inspector might open the ruleview before it has
+ // been populated with the rules for the div.
+ info("Wait until the rule view property is rendered");
+ const colorPropertyElement = await waitFor(() =>
+ getRuleViewProperty(view, "#target", "color")
+ );
+
// Retrieve the element for `--test-var` on which the CSS variable tooltip will appear.
- const colorPropertySpan = getRuleViewProperty(view, "div", "color").valueSpan;
+ const colorPropertySpan = colorPropertyElement.valueSpan;
const colorVariableElement = colorPropertySpan.querySelector(
".ruleview-variable"
);
// Retrieve the element for the background url on which the image preview will appear.
- const backgroundPropertySpan = getRuleViewProperty(view, "div", "background")
- .valueSpan;
+ const backgroundPropertySpan = getRuleViewProperty(
+ view,
+ "#target",
+ "background"
+ ).valueSpan;
const backgroundUrlElement = backgroundPropertySpan.querySelector(
".theme-link"
);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the tor-commits
mailing list