Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / transitions / mask-transitions.html
blobba9347fd1d9c563af553db987217f2100d85756f
1 <!DOCTYPE>
3 <html lang="en">
4 <head>
5 <title>mask transitions</title>
6 <style type="text/css" media="screen">
7 .box {
8 height: 100px;
9 width: 100px;
10 margin: 10px;
11 background-color: blue;
12 -webkit-mask: url('../fast/backgrounds/resources/mask-left.png') no-repeat 0 0;
13 -webkit-mask-size: 100px 100px;
14 -webkit-transition-duration: 1s;
15 -webkit-transition-timing-function: linear;
18 #box {
19 -webkit-transition-property: -webkit-mask;
22 #box.final {
23 -webkit-mask-position: 20px 20px;
26 #box2 {
27 -webkit-transition-property: -webkit-mask-size;
30 #box2.final {
31 -webkit-mask-size: 200px 200px;
34 </style>
35 <script src="transition-test-helpers.js" type="text/javascript" charset="utf-8"></script>
36 <script type="text/javascript" charset="utf-8">
38 const expectedValues = [
39 // [time, element-id, property, expected-value, tolerance]
40 [0.5, 'box', '-webkit-mask-position', [10, 10], 2],
41 [0.5, 'box2', '-webkit-mask-size', [150, 150], 10],
44 function setupTest()
46 document.getElementById('box').className = 'box final';
47 document.getElementById('box2').className = 'box final';
50 // We can't use the pause API because it only works for individual properties, and
51 // -webkit-mask-position is a compound property.
52 runTransitionTest(expectedValues, setupTest, false);
54 </script>
55 </head>
56 <body>
58 <div id="box" class="box"></div>
59 <div id="box2" class="box"></div>
61 <div id="result">
62 </div>
64 </body>
65 </html>