summaryrefslogtreecommitdiffstats
path: root/layout/inspector/tests/test_getCSSPseudoElementNames.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
commit0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch)
treea31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /layout/inspector/tests/test_getCSSPseudoElementNames.html
parentInitial commit. (diff)
downloadfirefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz
firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/inspector/tests/test_getCSSPseudoElementNames.html')
-rw-r--r--layout/inspector/tests/test_getCSSPseudoElementNames.html58
1 files changed, 58 insertions, 0 deletions
diff --git a/layout/inspector/tests/test_getCSSPseudoElementNames.html b/layout/inspector/tests/test_getCSSPseudoElementNames.html
new file mode 100644
index 0000000000..a16bbc4d12
--- /dev/null
+++ b/layout/inspector/tests/test_getCSSPseudoElementNames.html
@@ -0,0 +1,58 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>Test InspectorUtils::getCSSPseudoElementNames</title>
+ <script src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript">
+ const InspectorUtils = SpecialPowers.InspectorUtils;
+
+ // NOTE(emilio): When this changes, make sure to update _pseudoIsRelevant in devtools/server/actors/styles.js
+ let expected = new Set([
+ "::after",
+ "::before",
+ "::marker",
+ "::backdrop",
+ "::cue",
+ "::file-selector-button",
+ "::first-letter",
+ "::first-line",
+ "::placeholder",
+ "::selection",
+ "::-moz-color-swatch",
+ "::-moz-focus-inner",
+ "::-moz-meter-bar",
+ "::-moz-placeholder",
+ "::-moz-progress-bar",
+ "::-moz-range-progress",
+ "::-moz-range-thumb",
+ "::-moz-range-track",
+ ]);
+
+ let names = InspectorUtils.getCSSPseudoElementNames();
+ for (let name of names) {
+ ok(expected.has(name), name + " is included");
+ expected.delete(name);
+ }
+
+ if (expected.size > 0) {
+ todo_is(expected.size, 0,
+ "ideally all pseudo-element names would be listed in this test");
+ for (let extra of expected) {
+ info("extra element: " + extra);
+ }
+ }
+
+ </script>
+</head>
+<body>
+<h1>Test InspectorUtils::getCSSPseudoElementNames</h1>
+<p id="display"></p>
+<div id="content" style="display: none">
+
+</div>
+<pre id="test">
+</pre>
+</body>
+</html>