diff options
Diffstat (limited to 'devtools/client/shared/test/browser_outputparser.js')
-rw-r--r-- | devtools/client/shared/test/browser_outputparser.js | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/devtools/client/shared/test/browser_outputparser.js b/devtools/client/shared/test/browser_outputparser.js index 226e0bb685..7e0c1b7e00 100644 --- a/devtools/client/shared/test/browser_outputparser.js +++ b/devtools/client/shared/test/browser_outputparser.js @@ -6,7 +6,6 @@ add_task(async function () { await pushPref("layout.css.backdrop-filter.enabled", true); await pushPref("layout.css.individual-transform.enabled", true); - await pushPref("layout.css.motion-path-basic-shapes.enabled", true); await addTab("about:blank"); await performTest(); gBrowser.removeCurrentTab(); @@ -671,6 +670,36 @@ function testParseVariable(doc, parser) { `</span>)` + `</span>`, }, + { + text: "rgba(var(--r), 0, 0, var(--a))", + variables: { "--r": "255", "--a": "0.5" }, + expected: + // prettier-ignore + '<span data-color="rgba(255, 0, 0, 0.5)">' + + "<span>rgba("+ + "<span>" + + 'var(<span data-variable="--r = 255">--r</span>)' + + "</span>, 0, 0, " + + "<span>" + + 'var(<span data-variable="--a = 0.5">--a</span>)' + + "</span>" + + ")</span>" + + "</span>", + }, + { + text: "rgb(var(--not-seen, 255), 0, 0)", + variables: {}, + expected: + // prettier-ignore + '<span data-color="rgb( 255, 0, 0)">' + + "<span>rgb("+ + "<span>var(" + + `<span class="unmatched-class" data-variable="--not-seen is not set">--not-seen</span>,` + + `<span> 255</span>` + + ")</span>, 0, 0" + + ")</span>" + + "</span>", + }, ]; for (const test of TESTS) { |