Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / transitions / background-transitions.html
blob5ac17e7bc8b30e63e6eb4256cb3af4905c1137e3
1 <!DOCTYPE>
3 <html lang="en">
4 <head>
5 <title>background-position and size transitions</title>
6 <style type="text/css" media="screen">
7 .box {
8 height: 100px;
9 width: 100px;
10 margin: 10px;
11 -webkit-transition-duration: 1s;
12 -webkit-transition-timing-function: linear;
15 #box {
16 background: url('../fast/backgrounds/repeat/resources/gradient.gif') repeat 0 0;
17 -webkit-transition-property: background-position;
20 #box.final {
21 background-position: 20px 20px;
24 #box2 {
25 background: url('../fast/backgrounds/repeat/resources/gradient.gif') repeat 0 0;
26 -webkit-transition-property: -webkit-background-size;
27 -webkit-background-size: 10px 10px;
30 #box2.final {
31 -webkit-background-size: 30px 30px;
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', 'background-position', [10, 10], 2],
41 [0.5, 'box2', '-webkit-background-size', [20, 20], 2],
44 function setupTest()
46 document.getElementById('box').className = 'box final';
47 document.getElementById('box2').className = 'box final';
50 runTransitionTest(expectedValues, setupTest, true);
52 </script>
53 </head>
54 <body>
56 <div id="box" class="box"></div>
57 <div id="box2" class="box"></div>
59 <div id="result">
60 </div>
62 </body>
63 </html>