Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: LayoutTests/transitions/svg-layout-transition.html

Issue 955033002: [svg2] Make 'rx' and 'ry' presentation attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review fixes Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE> 1 <!DOCTYPE>
2
3 <html> 2 <html>
4 <head> 3 <head>
5 <style> 4 <style>
6 .init { 5 .init {
7 transition-duration: 1s; 6 transition-duration: 1s;
8 transition-timing-function: linear; 7 transition-timing-function: linear;
9 } 8 }
10 9
11 #x { 10 #x {
12 transition-property: x; 11 transition-property: x;
13 } 12 }
14 #x.final { 13 #x.final {
15 x: 200px; 14 x: 200px;
16 } 15 }
17 16
18 #y { 17 #y {
19 transition-property: y; 18 transition-property: y;
20 } 19 }
21 #y.final { 20 #y.final {
22 y: 200px; 21 y: 200px;
23 } 22 }
23
24 .rx {
25 transition-property: rx;
26 }
27 .rx.final {
28 rx: 200px;
29 }
30
31 .ry {
32 transition-property: ry;
33 }
34 .ry.final {
35 ry: 200px;
36 }
24 </style> 37 </style>
25 <script src="../animations/resources/animation-test-helpers.js"></script> 38 <script src="../animations/resources/animation-test-helpers.js"></script>
26 <script type="text/javascript"> 39 <script type="text/javascript">
27 40
28 const expectedValues = [ 41 const expectedValues = [
29 // [time, element-id, property, expected-value, tolerance] 42 // [time, element-id, property, expected-value, tolerance]
30 [0.5, 'x', 'x', 150, 20], 43 [0.5, 'x', 'x', 150, 20],
31 [0.5, 'y', 'y', 150, 20], 44 [0.5, 'y', 'y', 150, 20],
45 [0.5, 'rx', 'rx', 150, 20],
46 [0.5, 'ry', 'ry', 150, 20],
47 [0.5, 'erx', 'rx', 150, 20],
48 [0.5, 'ery', 'ry', 150, 20],
32 ]; 49 ];
33
34 function setupTest() 50 function setupTest()
35 { 51 {
36 document.getElementById('x').setAttribute('class', 'init final'); 52 for (var i = 0; i < expectedValues.length; i++)
37 document.getElementById('y').setAttribute('class', 'init final'); 53 document.getElementById(expectedValues[i][1]).classList.add("final");
38 } 54 }
39 55
40 runTransitionTest(expectedValues, setupTest); 56 runTransitionTest(expectedValues, setupTest);
41 </script> 57 </script>
42 </head> 58 </head>
43 <body> 59 <body>
44 <svg> 60 <svg>
45 <rect x="100" y="100" width="100" height="100" class="init" id="x"/> 61 <rect x="100" y="100" width="100" height="100" class="init" id="x"/>
46 <rect x="100" y="100" width="100" height="100" class="init" id="y"/> 62 <rect x="100" y="100" width="100" height="100" class="init" id="y"/>
63 <rect x="100" y="100" width="100" height="100" rx="100" ry="100" class="init rx" id="rx"/>
64 <rect x="100" y="100" width="100" height="100" rx="100" ry="100" class="init ry" id="ry"/>
65 <ellipse class="init rx" rx="100" ry="100" id="erx"/>
66 <ellipse class="init ry" rx="100" ry="100" id="ery"/>
47 </svg> 67 </svg>
48 68
49 <div id="result"> 69 <div id="result">
50 </div> 70 </div>
51
52 </body> 71 </body>
53 </html> 72 </html>
OLDNEW
« no previous file with comments | « LayoutTests/svg/css/parse-length-expected.txt ('k') | LayoutTests/transitions/svg-layout-transition-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698