layout/inspector/tests/test_isinheritableproperty.html

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:a5376e68a2e8
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=699592
5 -->
6 <head>
7 <title>Test for nsIDOMUtils::isInheritedProperty</title>
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 </head>
11 <body>
12 <pre id="test">
13 <script type="application/javascript">
14
15 function do_test() {
16 var utils = SpecialPowers.Cc["@mozilla.org/inspector/dom-utils;1"]
17 .getService(SpecialPowers.Ci.inIDOMUtils);
18
19 is(utils.isInheritedProperty("font-size"), true, "font-size is inherited.");
20
21 is(utils.isInheritedProperty("min-width"), false, "min-width is not inherited.");
22
23 is(utils.isInheritedProperty("font"), true, "shorthand font property is inherited.");
24
25 is(utils.isInheritedProperty("border"), false, "shorthand border property not inherited.");
26 is(utils.isInheritedProperty("garbage"), false, "Unknown property isn't inherited.");
27
28 SimpleTest.finish();
29 }
30
31 SimpleTest.waitForExplicitFinish();
32 addLoadEvent(do_test);
33
34
35 </script>
36 </pre>
37 </body>
38 </html>

mercurial