layout/style/test/test_layout_css_xul_display_values_content_enabled.html
author Cristian Tuns <ctuns@mozilla.com>
Fri, 24 Sep 2021 14:42:22 -0400
changeset 593147 0b4005ebc9776ff43d99d1427c1a1fd2e14d9a44
parent 557928 0bacd1b4ff6264741ade6ef8caa45fe7085683c5
permissions -rw-r--r--
Backed out changeset dd075a074e45 (bug 1730518) for causing content crashes (bug 1732479). CLOSED TREE

<!doctype html>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<div></div>
<script>
const VALUES = [
  "-moz-box",
  "-moz-inline-box",
  "-moz-deck",
  "-moz-popup",
];

SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv(
  {"set": [
    ["layout.css.xul-display-values.content.enabled", true],
    ["layout.css.xul-box-display-values.content.enabled", true],
  ]}
).then(runTest);

function runTest() {
  const div = document.querySelector("div");
  for (const value of VALUES) {
    div.style.display = value;
    is(div.style.display, value);
    is(getComputedStyle(div).display, value);
    ok(CSS.supports("display", value));
  }
  SimpleTest.finish();
}
</script>