2 <script src=
"/resources/testharness.js"></script>
3 <script src=
"/resources/testharnessreport.js"></script>
4 <style id=
"sheet"></style>
7 const NON_CONTENT_ACCESSIBLE_VALUES
= {
9 "-moz-buttonactivetext",
10 "-moz-buttonactiveface",
11 "-moz-buttondisabledface",
13 "-moz-colheaderhovertext",
15 "-moz-nativevisitedhyperlinktext",
16 "text-select-disabled-background",
17 "text-select-attention-background",
18 "text-select-attention-foreground",
19 "-moz-autofill-background",
26 "-moz-pull-down-menu",
34 "button-arrow-previous",
50 "-moz-menulist-arrow-button",
59 "scrollbar-horizontal",
62 "scrollbarbutton-down",
63 "scrollbarbutton-left",
64 "scrollbarbutton-right",
77 "tab-scroll-arrow-back",
78 "tab-scroll-arrow-forward",
81 "toolbarbutton-dropdown",
87 "treeheadersortarrow",
95 "-moz-win-communications-toolbox",
96 "-moz-win-media-toolbox",
97 "-moz-win-browsertabbar-toolbox",
98 "-moz-win-borderless-glass",
99 "-moz-win-exclude-glass",
100 "-moz-mac-help-button",
101 "-moz-window-button-box",
102 "-moz-window-button-box-maximized",
103 "-moz-window-button-close",
104 "-moz-window-button-maximize",
105 "-moz-window-button-minimize",
106 "-moz-window-button-restore",
107 "-moz-window-titlebar",
108 "-moz-window-titlebar-maximized",
109 "-moz-mac-active-source-list-selection",
110 "-moz-mac-disclosure-button-closed",
111 "-moz-mac-disclosure-button-open",
112 "-moz-mac-source-list",
113 "-moz-mac-source-list-selection",
118 "menulist-textfield",
128 "-moz-center-or-inherit",
132 const sheet
= document
.getElementById("sheet");
133 const div
= document
.querySelector("div");
136 sheet
.textContent
= `div { color: initial }`;
137 assert_equals(sheet
.sheet
.cssRules
[0].style
.length
, 1);
140 for (const prop
in NON_CONTENT_ACCESSIBLE_VALUES
) {
141 const values
= NON_CONTENT_ACCESSIBLE_VALUES
[prop
];
143 for (const value
of values
) {
144 sheet
.textContent
= `div { ${prop}: ${value} }`;
145 const block
= sheet
.sheet
.cssRules
[0].style
;
149 `${prop}: ${value} should not be parsed in content`
151 block
.setProperty(prop
, value
);
155 `${prop}: ${value} should not be settable via CSSOM in content`
157 div
.style
.setProperty(prop
, value
);
161 `${prop}: ${value} should not be settable via CSSOM in content (inline style)`
164 getComputedStyle(div
).getPropertyValue(prop
),
166 `${prop}: ${value} should not be settable via CSSOM in content (gcs)`
169 assert_false(CSS
.supports(prop
, value
), `${prop}: ${value} should not claim to be supported`)
171 }, prop
+ " non-accessible values: " + values
.join(", "))