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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/display-change-does-not-terminate-animation.html

Issue 2523543004: CSS Animations: Remove unnecessary webkit prefixes from 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 <html> 2 <html>
3 <head> 3 <head>
4 <style type="text/css"> 4 <style type="text/css">
5 #target { 5 #target {
6 position: relative; 6 position: relative;
7 height: 50px; 7 height: 50px;
8 width: 50px; 8 width: 50px;
9 background-color: blue; 9 background-color: blue;
10 } 10 }
11 .animated { 11 .animated {
12 -webkit-animation: test 10s linear; 12 animation: test 10s linear;
13 animation: test 10s linear; 13 animation: test 10s linear;
14 } 14 }
15 @-webkit-keyframes test { 15 @keyframes test {
16 from { left: 100px; } 16 from { left: 100px; }
17 to { left: 200px; } 17 to { left: 200px; }
18 } 18 }
19 @keyframes test { 19 @keyframes test {
20 from { left: 100px; } 20 from { left: 100px; }
21 to { left: 200px; } 21 to { left: 200px; }
22 } 22 }
23 </style> 23 </style>
24 <script type="text/javascript"> 24 <script type="text/javascript">
25 if (window.testRunner) { 25 if (window.testRunner) {
26 testRunner.dumpAsText(); 26 testRunner.dumpAsText();
27 testRunner.waitUntilDone(); 27 testRunner.waitUntilDone();
28 } 28 }
29 29
30 function log(message) { 30 function log(message) {
31 var div = document.createElement('div'); 31 var div = document.createElement('div');
32 div.textContent = message; 32 div.textContent = message;
33 document.getElementById('log').appendChild(div); 33 document.getElementById('log').appendChild(div);
34 } 34 }
35 35
36 var target; 36 var target;
37 function go() { 37 function go() {
38 target = document.getElementById('target'); 38 target = document.getElementById('target');
39 target.addEventListener('webkitAnimationStart', onStart); 39 target.addEventListener('animationstart', onStart);
40 target.classList.add('animated'); 40 target.classList.add('animated');
41 } 41 }
42 42
43 function onStart(e) { 43 function onStart(e) {
44 log('INFO: Start event fired'); 44 log('INFO: Start event fired');
45 target.removeEventListener('webkitAnimationStart', onStart); 45 target.removeEventListener('animationstart', onStart);
46 target.addEventListener('webkitAnimationStart', onRestart); 46 target.addEventListener('animationstart', onRestart);
47 setTimeout(setDisplay.bind(null, 0), 20); 47 setTimeout(setDisplay.bind(null, 0), 20);
48 } 48 }
49 49
50 function checkLeftValue(previousValue, isLast) { 50 function checkLeftValue(previousValue, isLast) {
51 var currentValue = getComputedStyle(target).left; 51 var currentValue = getComputedStyle(target).left;
52 var pass = parseFloat(previousValue) <= parseFloat(currentValue); 52 var pass = parseFloat(previousValue) <= parseFloat(currentValue);
53 log((pass ? 'PASS' : 'FAIL') + ': Left property was ' + (pass ? 'not ' : ' ') + 'reset' + 53 log((pass ? 'PASS' : 'FAIL') + ': Left property was ' + (pass ? 'not ' : ' ') + 'reset' +
54 (pass ? '' : ' (saw change from ' + previousValue + ' to ' + currentVa lue + ')')); 54 (pass ? '' : ' (saw change from ' + previousValue + ' to ' + currentVa lue + ')'));
55 if (isLast && window.testRunner) { 55 if (isLast && window.testRunner) {
56 testRunner.notifyDone(); 56 testRunner.notifyDone();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 </head> 96 </head>
97 <body onload="go()"> 97 <body onload="go()">
98 <p> 98 <p>
99 Tests that changing the display property of a running animation to a value 99 Tests that changing the display property of a running animation to a value
100 other than 'none' does not cause it to terminate or re-start. 100 other than 'none' does not cause it to terminate or re-start.
101 </p> 101 </p>
102 <div id="target">target</div> 102 <div id="target">target</div>
103 <div id="log"></div> 103 <div id="log"></div>
104 </body> 104 </body>
105 </html> 105 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698