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

Side by Side Diff: third_party/WebKit/LayoutTests/compositing/animation/computed-style-during-delay.html

Issue 2521163002: CSS Animations: Reduce usage of webkit prefix in layout tests (Closed)
Patch Set: Created 4 years 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 html> 1 <!DOCTYPE html>
2 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <style type="text/css" media="screen"> 5 <style type="text/css" media="screen">
6 .box { 6 .box {
7 height: 100px; 7 height: 100px;
8 width: 100px; 8 width: 100px;
9 margin: 20px; 9 margin: 20px;
10 background-color: blue; 10 background-color: blue;
11 transform: translate3d(0, 0, 0); 11 transform: translate3d(0, 0, 0);
12 } 12 }
13 13
14 #movers.moved > .box { 14 #movers.moved > .box {
15 -webkit-animation: move 1s 1s linear; /* Note 1 sec delay */ 15 animation: move 1s 1s linear; /* Note 1 sec delay */
16 } 16 }
17 17
18 /* Test that we fetch the current style, not the one snapshotted when th e animation started */ 18 /* Test that we fetch the current style, not the one snapshotted when th e animation started */
19 #movers.moved > #changedbox { 19 #movers.moved > #changedbox {
20 transform: translate3d(50px, 0, 0); 20 transform: translate3d(50px, 0, 0);
21 } 21 }
22 22
23 /* Test that fill-mode: backwards works */ 23 /* Test that fill-mode: backwards works */
24 #movers.moved > #filledbox { 24 #movers.moved > #filledbox {
25 -webkit-animation: move 1s 1s linear backwards; 25 animation: move 1s 1s linear backwards;
26 } 26 }
27 27
28 @-webkit-keyframes move { 28 @keyframes move {
29 from { transform: translateX(100px); } 29 from { transform: translateX(100px); }
30 to { transform: translateX(400px); } 30 to { transform: translateX(400px); }
31 } 31 }
32 </style> 32 </style>
33 <script type="text/javascript" charset="utf-8"> 33 <script type="text/javascript" charset="utf-8">
34 if (window.testRunner) { 34 if (window.testRunner) {
35 testRunner.dumpAsText(); 35 testRunner.dumpAsText();
36 testRunner.waitUntilDone(); 36 testRunner.waitUntilDone();
37 } 37 }
38 38
39 var results = []; 39 var results = [];
40 function check(message, expected, actual) { 40 function check(message, expected, actual) {
41 if (expected == actual) { 41 if (expected == actual) {
42 results.push('PASS - ' + message); 42 results.push('PASS - ' + message);
43 } else { 43 } else {
44 results.push('FAIL - ' + actual); 44 results.push('FAIL - ' + actual);
45 } 45 }
46 } 46 }
47 47
48 onload = function() { 48 onload = function() {
49 document.getElementById('movers').className = 'moved'; 49 document.getElementById('movers').className = 'moved';
50 document.body.offsetTop; 50 document.body.offsetTop;
51 check('default', 'matrix(1, 0, 0, 1, 0, 0)', getComputedStyle(docume nt.querySelector('#testbox')).webkitTransform); 51 check('default', 'matrix(1, 0, 0, 1, 0, 0)', getComputedStyle(docume nt.querySelector('#testbox')).transform);
52 check('changed style', 'matrix(1, 0, 0, 1, 50, 0)', getComputedStyle (document.querySelector('#changedbox')).webkitTransform); 52 check('changed style', 'matrix(1, 0, 0, 1, 50, 0)', getComputedStyle (document.querySelector('#changedbox')).transform);
53 check('backwards fill', 'matrix(1, 0, 0, 1, 100, 0)', getComputedSty le(document.querySelector('#filledbox')).webkitTransform); 53 check('backwards fill', 'matrix(1, 0, 0, 1, 100, 0)', getComputedSty le(document.querySelector('#filledbox')).transform);
54 document.body.innerHTML = results.join('<br>'); 54 document.body.innerHTML = results.join('<br>');
55 if (window.testRunner) 55 if (window.testRunner)
56 testRunner.notifyDone(); 56 testRunner.notifyDone();
57 } 57 }
58 58
59 </script> 59 </script>
60 </head> 60 </head>
61 <body> 61 <body>
62 <p>Test computed style during the delay phase of an accelerated animation.</ p> 62 <p>Test computed style during the delay phase of an accelerated animation.</ p>
63 <div id="movers"> 63 <div id="movers">
64 <div id="testbox" class="box"></div> 64 <div id="testbox" class="box"></div>
65 <div id="changedbox" class="box"></div> 65 <div id="changedbox" class="box"></div>
66 <div id="filledbox" class="box"></div> 66 <div id="filledbox" class="box"></div>
67 </div> 67 </div>
68 <div id="result"> 68 <div id="result">
69 </div> 69 </div>
70 </body> 70 </body>
71 </html> 71 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698