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" />
14 <div id=
"content" style=
"display: none">
16 <div id=
"testnode"></div>
20 <script class=
"testbody" type=
"text/javascript">
22 var gDeclaration = document.getElementById(
"testnode").style;
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,
"");
45 if (property in gKnownFails &&
46 gKnownFails[property].indexOf(badval) != -
1)
49 func(gDeclaration.getPropertyValue(property),
"",
50 "invalid value '" + badval +
"' not accepted for '" + 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);