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

Side by Side Diff: LayoutTests/transitions/color-transition-rounding.html

Issue 15738009: Beat the transition tests with a sanity stick. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Pass presubmit. Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE> 1 <!DOCTYPE>
2 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <style> 5 <style>
6 #test { 6 #test {
7 color: #00F; 7 color: #00F;
8 -webkit-transition: color 1s linear; 8 -webkit-transition: color 10s linear;
9 } 9 }
10 10
11 #test.changed { 11 #test.changed {
12 color: #F00; 12 color: #F00;
13 } 13 }
14 </style> 14 </style>
15 <script src="resources/transition-test-helpers.js"></script> 15 <script src="../animations/resources/animation-test-helpers.js"></script>
16 <script type="text/javascript"> 16 <script type="text/javascript">
17 const expectedValues = [ 17 const expectedValues = [
18 // [time, element-id, property, expected-value, tolerance, post-completion callback, should-be-transitioning] 18 // [time, element-id, property, expected-value, tolerance, post-completion callback, should-be-transitioning]
19 [0.4998, 'test', 'color', [127, 0, 128], 0], 19 [4.998, 'test', 'color', [127, 0, 128], 0],
20 [0.5000, 'test', 'color', [128, 0, 128], 0], 20 [5.000, 'test', 'color', [128, 0, 128], 0],
21 [0.5002, 'test', 'color', [128, 0, 127], 0], 21 [5.002, 'test', 'color', [128, 0, 127], 0],
22 ]; 22 ];
23 23
24 function setupTest() 24 function setupTest()
25 { 25 {
26 document.getElementById('test').className = 'changed'; 26 document.getElementById('test').className = 'changed';
27 } 27 }
28 28
29 runTransitionTest(expectedValues, setupTest, usePauseAPI); 29 runTransitionTest(expectedValues, setupTest, usePauseAPI);
30 </script> 30 </script>
31 </head> 31 </head>
32 <body> 32 <body>
33 33
34 <div id="test"> 34 <div id="test">
35 This test will probably fail when run manually; it requires the pause API fo r accurate results. 35 This test will probably fail when run manually; it requires the pause API fo r accurate results.
36 </div> 36 </div>
37 37
38 <div id="result"></div> 38 <div id="result"></div>
39 </body> 39 </body>
40 </html> 40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698