Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / transitions / multiple-background-transitions.html
blob2c0e268fd3e097c404de4f283b52b3a04279bacc
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 border: 1px solid black;
12 background-repeat: no-repeat;
13 -webkit-transition-duration: 1s;
14 -webkit-transition-timing-function: linear;
15 -webkit-transition-property: background-position;
18 #box {
19 background-image: url('../fast/backgrounds/repeat/resources/gradient.gif'), url('../fast/backgrounds/repeat/resources/gradient.gif');
20 background-position: 0 0, 0 80px;
23 #box.final {
24 background-position: 80px 80px, 80px 0;
27 /* Mismatched layers */
28 #box2 {
29 background-image: url('../fast/backgrounds/repeat/resources/gradient.gif'), url('../fast/backgrounds/repeat/resources/gradient.gif');
30 background-position: 0 0, 0 80px;
33 #box2.final {
34 background-image: url('../fast/backgrounds/repeat/resources/gradient.gif');
35 background-position: 80px 80px;
38 #box3 {
39 background-image: url('../fast/backgrounds/repeat/resources/gradient.gif');
40 background-position: 80px 80px;
43 #box3.final {
44 background-image: url('../fast/backgrounds/repeat/resources/gradient.gif'), url('../fast/backgrounds/repeat/resources/gradient.gif');
45 background-position: 0 0, 0 80px;
48 </style>
49 <script src="transition-test-helpers.js" type="text/javascript" charset="utf-8"></script>
50 <script type="text/javascript" charset="utf-8">
52 const expectedValues = [
53 // [time, element-id, property, expected-value, tolerance]
54 [0.5, 'box', 'background-position', [40, 40], 2],
55 [0.5, 'box2', 'background-position', [40, 40], 2],
56 [0.5, 'box3', 'background-position', [40, 40], 2],
59 function setupTest()
61 document.getElementById('box').className = 'box final';
62 document.getElementById('box2').className = 'box final';
63 document.getElementById('box3').className = 'box final';
66 runTransitionTest(expectedValues, setupTest, true);
68 </script>
69 </head>
70 <body>
72 <div id="box" class="box"></div>
73 <div id="box2" class="box"></div>
74 <div id="box3" class="box"></div>
76 <div id="result">
77 </div>
79 </body>
80 </html>