layout/style/test/test_bug798567.html

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

michael@0 1 <!DOCTYPE html>
michael@0 2 <html>
michael@0 3 <!--
michael@0 4 https://bugzilla.mozilla.org/show_bug.cgi?id=798567
michael@0 5 -->
michael@0 6 <head>
michael@0 7 <title>Test for Bug 798567</title>
michael@0 8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
michael@0 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
michael@0 10 </head>
michael@0 11 <body>
michael@0 12 <div id="some_div" style="opacity: 0.5">bar</div>
michael@0 13 <div style="cursor: crosshair" id="div_cursor">foobar</div>
michael@0 14 <script type="application/javascript">
michael@0 15 var elm = document.getElementById("some_div");
michael@0 16 var cs = getComputedStyle(elm);
michael@0 17 var cssValue = cs.getPropertyCSSValue("opacity");
michael@0 18 is(cssValue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER), 0.5, "wrong opacity of some_div");
michael@0 19
michael@0 20 elm = document.getElementById("div_cursor");
michael@0 21 cs = getComputedStyle(elm);
michael@0 22 cssValue = cs.getPropertyCSSValue("cursor");
michael@0 23 ok(cssValue[0], "element with set cursor should have a a computed style");
michael@0 24 </script>
michael@0 25 </body>
michael@0 26 </html>

mercurial