Bug 1839315: part 4) Link from `SheetLoadData::mWasAlternate` to spec. r=emilio DONTBUILD
[gecko.git] / layout / style / test / test_exposed_prop_accessors.html
blob765818bae49af0baec0cd52138247b7a51e2ab6f
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=375363
5 -->
6 <head>
7 <title>Test for cloning of CSS property values (including 'inherit', 'initial' and 'unset')</title>
8 <script src="/tests/SimpleTest/SimpleTest.js"></script>
9 <script type="text/javascript" src="property_database.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
11 </head>
12 <body>
13 <p id="display"></p>
14 <pre id="test">
15 <script class="testbody" type="text/javascript">
17 /**
18 * Test that makes sure that we have exposed getters/setters for all the
19 * various variants of our CSS property names that the spec calls for.
21 for (var prop in gCSSProperties) {
22 var info = gCSSProperties[prop];
24 var s = document.createElement("div").style;
26 is(s[info.domProp], "", prop + " should not be set yet");
27 s[info.domProp] = info.initial_values[0];
28 isnot(s[info.domProp], "", prop + " should now be set");
29 is(s[prop], s[info.domProp],
30 "Getting " + prop + " via name should work")
31 s = document.createElement("div").style;
32 is(s[info.domProp], "", prop + " should not be set here either");
33 s[prop] = info.initial_values[0];
34 isnot(s[info.prop], "", prop + " should now be set again");
35 is(s[info.domProp], s[prop],
36 "Setting " + prop + " via name should work");
38 </script>
39 </pre>
40 </body>
41 </html>