DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
<!DOCTYPE HTML>
<html>
<!--
-->
<head>
  <title>Test that we reject syntax errors listed in property_database.js</title>
  <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="text/javascript" src="property_database.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none">

<div id="testnode"></div>
  
</div>
<pre id="test">
<script class="testbody" type="text/javascript">

var gDeclaration = document.getElementById("testnode").style;

var gKnownFails = {
  "-moz-border-bottom-colors": [ "red none", "red inherit" ],
  "-moz-border-left-colors": [ "red none", "red inherit" ],
  "-moz-border-right-colors": [ "red none", "red inherit" ],
  "-moz-border-top-colors": [ "red none", "red inherit" ],
  "pitch-range": [ " -0.01", "100.2", "108", "-3" ],
  "richness": [ " -0.01", "100.2", "108", "-3" ],
  "stress": [ " -0.01", "100.2", "108", "-3" ],
  "volume": [ " -0.01", "100.2", "108", "-3" ],
  "text-decoration": [ "line-through blink line-through" ],
  "stroke-miterlimit": [ "0.9", "0" ]
}

for (var property in gCSSProperties) {
  var info = gCSSProperties[property];
  for (var idx in info.invalid_values) {
    var badval = info.invalid_values[idx];

    gDeclaration.setProperty(property, badval, "");

    var func = is;
    if (property in gKnownFails &&
        gKnownFails[property].indexOf(badval) != -1)
      func = todo_is;

    func(gDeclaration.getPropertyValue(property), "",
         "invalid value '" + badval + "' not accepted for '" + property +
         "' property");

    if ("subproperties" in info) {
      for (var sidx in info.subproperties) {
        var subprop = info.subproperties[sidx];
        func(gDeclaration.getPropertyValue(subprop), "",
             "invalid value '" + badval + "' not accepted for '" + property +
             "' property when testing subproperty '" + subprop + "'");
      }
    }

    gDeclaration.removeProperty(property);
  }
}

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