1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
6 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
7 <title>Test shorthand transitions
</title>
8 <style type=
"text/css" media=
"screen">
13 background-color: gray;
14 border:
0px solid rgb(
0,
0,
0);
15 -webkit-transition: border
1s linear;
19 border:
20px dashed rgb(
255,
0,
255);
26 background-color: gray;
27 border:
0px solid rgb(
0,
0,
0);
28 -webkit-transition: border-width
1s linear;
32 border:
20px solid rgb(
255,
0,
255);
39 background-color: gray;
40 border:
0px solid rgb(
0,
0,
0);
41 -webkit-transition: border
1s linear;
46 border-bottom-width:
40px;
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 // color and width of each side should be animating
55 [
0.5, 'box', 'border-top-color', [
128,
0,
128],
10],
56 [
0.5, 'box', 'border-right-color', [
128,
0,
128],
10],
57 [
0.5, 'box', 'border-bottom-color', [
128,
0,
128],
10],
58 [
0.5, 'box', 'border-left-color', [
128,
0,
128],
10],
59 [
0.5, 'box', 'border-top-width',
10,
1],
60 [
0.5, 'box', 'border-right-width',
10,
1],
61 [
0.5, 'box', 'border-bottom-width',
10,
1],
62 [
0.5, 'box', 'border-left-width',
10,
1],
64 // only border-width should be animating
65 [
0.5, 'box1', 'border-top-width',
10,
1],
66 [
0.5, 'box1', 'border-top-color', [
255,
0,
255],
0], // initial value
68 // border-width should be animating
69 [
0.5, 'box2', 'border-top-width',
10,
1],
70 [
0.5, 'box2', 'border-bottom-width',
20,
1],
75 var box = document.getElementById('box');
76 box.className = 'final';
78 var box1 = document.getElementById('box1');
79 box1.className = 'final';
81 var box2 = document.getElementById('box2');
82 box2.className = 'final';
85 runTransitionTest(expectedValues, setupTest, false);
91 Tests transitions of the border shorthand properties.