layout/style/test/test_html_attribute_computed_values.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/style/test/test_html_attribute_computed_values.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,84 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug </title>
    1.11 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.13 +</head>
    1.14 +<body>
    1.15 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
    1.16 +<div id="content"></div>
    1.17 +<pre id="test">
    1.18 +<script type="application/javascript">
    1.19 +
    1.20 +
    1.21 +var gValues = [
    1.22 +  {
    1.23 +     element: "<li type='i'></li>",
    1.24 +     property: "list-style-type",
    1.25 +     value: "lower-roman"
    1.26 +  },
    1.27 +  {
    1.28 +     element: "<li type='I'></li>",
    1.29 +     property: "list-style-type",
    1.30 +     value: "upper-roman"
    1.31 +  },
    1.32 +  {
    1.33 +     element: "<li type='a'></li>",
    1.34 +     property: "list-style-type",
    1.35 +     value: "lower-alpha"
    1.36 +  },
    1.37 +  {
    1.38 +     element: "<li type='A'></li>",
    1.39 +     property: "list-style-type",
    1.40 +     value: "upper-alpha"
    1.41 +  },
    1.42 +  {
    1.43 +     element: "<li type='1'></li>",
    1.44 +     property: "list-style-type",
    1.45 +     value: "decimal"
    1.46 +  },
    1.47 +  {
    1.48 +     element: "<ol type='i'></ol>",
    1.49 +     property: "list-style-type",
    1.50 +     value: "lower-roman"
    1.51 +  },
    1.52 +  {
    1.53 +     element: "<ol type='I'></ol>",
    1.54 +     property: "list-style-type",
    1.55 +     value: "upper-roman"
    1.56 +  },
    1.57 +  {
    1.58 +     element: "<ol type='a'></ol>",
    1.59 +     property: "list-style-type",
    1.60 +     value: "lower-alpha"
    1.61 +  },
    1.62 +  {
    1.63 +     element: "<ol type='A'></ol>",
    1.64 +     property: "list-style-type",
    1.65 +     value: "upper-alpha"
    1.66 +  },
    1.67 +  {
    1.68 +     element: "<ol type='1'></ol>",
    1.69 +     property: "list-style-type",
    1.70 +     value: "decimal"
    1.71 +  },
    1.72 +];
    1.73 +
    1.74 +var content = document.getElementById("content");
    1.75 +for (var i = 0; i < gValues.length; ++i) {
    1.76 +  var v = gValues[i];
    1.77 +
    1.78 +  content.innerHTML = v.element;
    1.79 +  is(getComputedStyle(content.firstChild, "").getPropertyValue(v.property),
    1.80 +     v.value,
    1.81 +     v.property + " for " + v.element);
    1.82 +}
    1.83 +
    1.84 +</script>
    1.85 +</pre>
    1.86 +</body>
    1.87 +</html>

mercurial