Mypal/layout/style/test/test_bug798567.html
2019-03-11 13:26:37 +03:00

27 lines
939 B
HTML

<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=798567
-->
<head>
<title>Test for Bug 798567</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<div id="some_div" style="opacity: 0.5">bar</div>
<div style="cursor: crosshair" id="div_cursor">foobar</div>
<script type="application/javascript">
var elm = document.getElementById("some_div");
var cs = getComputedStyle(elm);
var cssValue = cs.getPropertyCSSValue("opacity");
is(cssValue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER), 0.5, "wrong opacity of some_div");
elm = document.getElementById("div_cursor");
cs = getComputedStyle(elm);
cssValue = cs.getPropertyCSSValue("cursor");
ok(cssValue[0], "element with set cursor should have a a computed style");
</script>
</body>
</html>