ede40c8b4259e245fc859d229e50dd673af9416e
[WebKit-https.git] / LayoutTests / transitions / svg-text-shadow-transition.html
1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] -->
2 <html>
3 <head>
4     <style>
5         .text {
6             -webkit-transition-duration: 1s;
7             -webkit-transition-timing-function: linear;
8             -webkit-transition-property: text-shadow;
9         }
10
11         #text {
12             text-shadow: -25px -5px 15px red;
13         }
14
15         #text.final {
16             text-shadow: 5px 5px 15px green;
17         }
18     </style>
19
20     <script src="resources/transition-test-helpers.js"></script>
21     <script type="text/javascript">
22         const expectedValues = [
23             // [time, element-id, property, expected-value, tolerance]
24             [0, 'text', 'text-shadow', [-25, -5, 0, 15], 4],
25             [1, 'text', 'text-shadow', [5, 5, 0, 15], 4]
26         ];
27
28         function setupTest()
29         {
30             document.getElementById('text').className.baseVal = 'text final';
31         }
32
33         var doPixelTest = true;
34         runTransitionTest(expectedValues, setupTest, usePauseAPI, doPixelTest);
35     </script>
36 </head>
37 <body>
38     <svg width="400" height="100">
39         <text id="text" class="text" x="10" y="50" style="font-size:30pt; font-weight:bold;">Shadow on texts</text>
40     </svg>
41
42     <div id="result">
43     </div>
44 </body>
45 </html>