layout/style/test/test_bug798567.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/style/test/test_bug798567.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,26 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=798567
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 798567</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 +  <div id="some_div"  style="opacity: 0.5">bar</div>
    1.16 +  <div style="cursor: crosshair" id="div_cursor">foobar</div>
    1.17 +  <script type="application/javascript">
    1.18 +    var elm = document.getElementById("some_div");
    1.19 +    var cs = getComputedStyle(elm);
    1.20 +    var cssValue = cs.getPropertyCSSValue("opacity");
    1.21 +    is(cssValue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER), 0.5, "wrong opacity of some_div");
    1.22 +
    1.23 +    elm = document.getElementById("div_cursor");
    1.24 +    cs = getComputedStyle(elm);
    1.25 +    cssValue = cs.getPropertyCSSValue("cursor");
    1.26 +    ok(cssValue[0], "element with set cursor should have a a computed style");
    1.27 +  </script>
    1.28 +</body>
    1.29 +</html>

mercurial