layout/inspector/tests/test_isinheritableproperty.html
author Mozilla Releng Treescript <release+treescript@mozilla.org>
Mon, 29 Nov 2021 16:20:01 +0000
changeset 671270 d7ba6bbdc41bf0c76d05937c5104894d98637d92
parent 531524 c9c0c6f2eed54a187e124942e53c3660b4cf17d8
permissions -rw-r--r--
No bug - Tagging 5a1a2f3b06c23a27532ba48f9999c59c643f3f36 with FIREFOX_95_0_BUILD1 a=release CLOSED TREE DONTBUILD

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=699592
-->
<head>
  <title>Test for InspectorUtils::isInheritedProperty</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<pre id="test">
<script type="application/javascript">

const InspectorUtils = SpecialPowers.InspectorUtils;

function do_test() {
  is(InspectorUtils.isInheritedProperty("font-size"), true, "font-size is inherited.");

  is(InspectorUtils.isInheritedProperty("min-width"), false, "min-width is not inherited.");

  is(InspectorUtils.isInheritedProperty("font"), true, "shorthand font property is inherited.");

  is(InspectorUtils.isInheritedProperty("border"), false, "shorthand border property not inherited.");
  is(InspectorUtils.isInheritedProperty("garbage"), false, "Unknown property isn't inherited.");

  SimpleTest.finish();
}

SimpleTest.waitForExplicitFinish();
addLoadEvent(do_test);


</script>
</pre>
</body>
</html>