Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / layout / style / test / test_property_syntax_errors.html
blob6e561f2fc4792da52514dff0fea46072e358aa47
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 -->
5 <head>
6 <title>Test that we reject syntax errors listed in property_database.js</title>
7 <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
8 <script type="text/javascript" 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 <div id="content" style="display: none">
16 <div id="testnode"></div>
18 </div>
19 <pre id="test">
20 <script class="testbody" type="text/javascript">
22 var gDeclaration = document.getElementById("testnode").style;
24 var gKnownFails = {
25 "-moz-border-bottom-colors": [ "red none", "red inherit" ],
26 "-moz-border-left-colors": [ "red none", "red inherit" ],
27 "-moz-border-right-colors": [ "red none", "red inherit" ],
28 "-moz-border-top-colors": [ "red none", "red inherit" ],
29 "pitch-range": [ " -0.01", "100.2", "108", "-3" ],
30 "richness": [ " -0.01", "100.2", "108", "-3" ],
31 "stress": [ " -0.01", "100.2", "108", "-3" ],
32 "volume": [ " -0.01", "100.2", "108", "-3" ],
33 "text-decoration": [ "line-through blink line-through" ],
34 "stroke-miterlimit": [ "0.9", "0" ]
37 for (var property in gCSSProperties) {
38 var info = gCSSProperties[property];
39 for (var idx in info.invalid_values) {
40 var badval = info.invalid_values[idx];
42 gDeclaration.setProperty(property, badval, "");
44 var func = is;
45 if (property in gKnownFails &&
46 gKnownFails[property].indexOf(badval) != -1)
47 func = todo_is;
49 func(gDeclaration.getPropertyValue(property), "",
50 "invalid value '" + badval + "' not accepted for '" + property +
51 "' property");
53 if ("subproperties" in info) {
54 for (var sidx in info.subproperties) {
55 var subprop = info.subproperties[sidx];
56 func(gDeclaration.getPropertyValue(subprop), "",
57 "invalid value '" + badval + "' not accepted for '" + property +
58 "' property when testing subproperty '" + subprop + "'");
62 gDeclaration.removeProperty(property);
66 </script>
67 </pre>
68 </body>
69 </html>