Bug 1839315: part 4) Link from `SheetLoadData::mWasAlternate` to spec. r=emilio DONTBUILD
[gecko.git] / layout / style / test / test_marker_restrictions.html
blobf547f928cb922c108951f3c54c24ce7026f2dbf3
1 <!doctype html>
2 <meta charset="utf-8">
3 <title>Test for ::marker property restrictions.</title>
4 <script src="/tests/SimpleTest/SimpleTest.js"></script>
5 <script src="property_database.js"></script>
6 <link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
7 <style id="s"></style>
8 <div id="test"></div>
9 <div id="control"></div>
10 <script>
11 const test = getComputedStyle($("test"), "::marker");
12 const control = getComputedStyle($("control"), "::marker");
14 for (const prop in gCSSProperties) {
15 const info = gCSSProperties[prop];
16 if (info.type == CSS_TYPE_TRUE_SHORTHAND)
17 continue;
19 let prereqs = "";
20 if (info.prerequisites)
21 for (let name in info.prerequisites)
22 prereqs += `${name}: ${info.prerequisites[name]}; `;
24 $("s").textContent = `
25 #control::marker { ${prop}: ${info.initial_values[0]}; ${prereqs} }
26 #test::marker { ${prop}: ${info.other_values[0]}; ${prereqs} }
29 (info.applies_to_marker ? isnot : is)(
30 get_computed_value(test, prop),
31 get_computed_value(control, prop),
32 `${prop} should ${info.applies_to_marker ? "" : " not"} apply to ::marker`);
35 </script>