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

Side by Side Diff: LayoutTests/transitions/cross-fade-border-image.html

Issue 716963002: Remove property-specific handling in animation-test-helpers.js (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@animhelpercleanup
Patch Set: rm whitespace Created 6 years, 1 month 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 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <style> 5 <style>
6 .box { 6 .box {
7 height: 200px; 7 height: 200px;
8 width: 200px; 8 width: 200px;
9 margin: 10px; 9 margin: 10px;
10 -webkit-transition-duration: 1s; 10 -webkit-transition-duration: 1s;
(...skipping 11 matching lines...) Expand all
22 22
23 #boxShorthand { 23 #boxShorthand {
24 border-image: url('../animations/resources/blue-100.png') 5 5 5 5 /40px stretch stretch; 24 border-image: url('../animations/resources/blue-100.png') 5 5 5 5 /40px stretch stretch;
25 -webkit-transition-property: border-image; 25 -webkit-transition-property: border-image;
26 } 26 }
27 27
28 #boxShorthand.final { 28 #boxShorthand.final {
29 border-image: url('../animations/resources/stripes-100.png') 5 5 5 5 /40 px stretch stretch; 29 border-image: url('../animations/resources/stripes-100.png') 5 5 5 5 /40 px stretch stretch;
30 } 30 }
31 31
32 #boxStatic {
33 border-image: -webkit-cross-fade(url(../animations/resources/blue-100.pn g), url(../animations/resources/stripes-100.png), 0.5) 5 5 5 5 /40px stretch str etch;
34 }
35
32 </style> 36 </style>
33 <script src="../animations/resources/animation-test-helpers.js" type="text/j avascript"></script> 37 <script src="../animations/resources/animation-test-helpers.js" type="text/j avascript"></script>
34 <script> 38 <script>
35 39
36 const expectedValues = [ 40 const expectedValues = [
37 // [time, element-id, property, expected-value, tolerance] 41 // [time, element-id, property, expected-value, tolerance]
38 [0.5, 'box', 'border-image-source', 0.5, 0.05], 42 [0.5, ['box', 'boxStatic'], 'border-image-source', null, 0.05],
39 [0.5, 'boxShorthand', 'border-image', 0.5, 0.05], 43 [0.5, ['boxShorthand', 'boxStatic'], 'border-image', null, 0.05],
40 ]; 44 ];
41 45
42 function setupTest() 46 function setupTest()
43 { 47 {
44 document.getElementById('box').className = 'box final'; 48 document.getElementById('box').className = 'box final';
45 document.getElementById('boxShorthand').className = 'box final'; 49 document.getElementById('boxShorthand').className = 'box final';
46 } 50 }
47 51
48 // This test was flaky because it would start before the images were loaded. 52 // This test was flaky because it would start before the images were loaded.
49 var imagesLoaded = 0; 53 var imagesLoaded = 0;
50 function imageLoaded() { 54 function imageLoaded() {
51 ++imagesLoaded; 55 ++imagesLoaded;
52 if (imagesLoaded == 2) 56 if (imagesLoaded == 2)
53 runTransitionTest(expectedValues, setupTest); 57 runTransitionTest(expectedValues, setupTest);
54 } 58 }
55 </script> 59 </script>
56 </head> 60 </head>
57 <body> 61 <body>
58 <div id="box" class="box"></div> 62 <div id="box" class="box"></div>
59 <div id="boxShorthand" class="box"></div> 63 <div id="boxShorthand" class="box"></div>
64 <div id="boxStatic" class="box"></div>
60 65
61 <div id="result"></div> 66 <div id="result"></div>
62 <img src="../animations/resources/stripes-100.png" onLoad="imageLoaded();"/> 67 <img src="../animations/resources/stripes-100.png" onLoad="imageLoaded();"/>
63 <img src="../animations/resources/blue-100.png" onLoad="imageLoaded();"/> 68 <img src="../animations/resources/blue-100.png" onLoad="imageLoaded();"/>
64 </body> 69 </body>
65 </html> 70 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698