Backed out changeset b71c8c052463 (bug 1943846) for causing mass failures. CLOSED...
[gecko.git] / layout / inspector / tests / test_supports.html
blob4979c9a8ca04a53dcf7afcc0af60de3b7e8f8c81
1 <!doctype html>
2 <title>Test for InspectorUtils.supports</title>
3 <script src="/tests/SimpleTest/SimpleTest.js"></script>
4 <script>
5 const InspectorUtils = SpecialPowers.InspectorUtils;
7 ok(!CSS.supports("-moz-window-transform: unset"), "-moz-window-transform is only available to chrome and UA sheets");
8 for (let chrome of [true, false]) {
9 is(InspectorUtils.supports("-moz-window-transform: unset", { chrome }), chrome, "InspectorUtils.supports should properly report to support chrome-only properties");
12 ok(!CSS.supports("-moz-top-layer: auto"), "-moz-top-layer is only available to UA sheets");
13 ok(!CSS.supports("selector(:-moz-inert)"), "-moz-inert is an UA-only pseudo-class");
14 for (let userAgent of [true, false]) {
15 is(InspectorUtils.supports("-moz-top-layer: auto", { userAgent }), userAgent, "InspectorUtils.supports should properly report to support UA properties");
16 is(InspectorUtils.supports("selector(:-moz-inert)", { userAgent }), userAgent, "InspectorUtils.supports should properly report to support UA-only selectors");
19 ok(!CSS.supports("width: 100"), "width shouldn't allow unitless lengths in non-quirks, and in CSS.supports");
20 for (let quirks of [true, false]) {
21 is(InspectorUtils.supports("width: 100", { quirks }), quirks, "InspectorUtils.supports should allow quirks if told to do so");
23 </script>