summaryrefslogtreecommitdiffstats
path: root/layout/style/test/test_bug1394302.html
blob: e21bcc4ea1ec3b99767246ee8060eb2a65e89ca5 (plain)
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
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1394302
-->
<head>
  <title>Test for Bug 1394302</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    <style>
    #inner {
      animation: setFontSize 0s forwards;
    }
    @keyframes setFontSize {
      to { font-size: calc(110% + 0.1em); }
    }
    </style>
</head>
<body>
<div id=outer>
  <div id=inner></div>
</div>
<script>
var outer = document.getElementById("outer");
outer.style.fontSize = '10px';
is(getComputedStyle(inner).fontSize, "12px");

outer.style.fontSize = '20px';
is(getComputedStyle(inner).fontSize, "24px");
</script>
</body>
</html>