| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <style> | 4 <style> |
| 5 .box { | 5 .box { |
| 6 height: 100px; | 6 height: 100px; |
| 7 width: 100px; | 7 width: 100px; |
| 8 margin: 10px; | 8 margin: 10px; |
| 9 background-color: gray; | 9 background-color: gray; |
| 10 } | 10 } |
| 11 | 11 |
| 12 #box { | 12 #box { |
| 13 opacity: 1; | 13 opacity: 1; |
| 14 -webkit-transition: opacity 1s linear; | 14 -webkit-transition: opacity 1s linear; |
| 15 } | 15 } |
| 16 | 16 |
| 17 #box.fade { | 17 #box.fade { |
| 18 opacity: 0; | 18 opacity: 0; |
| 19 } | 19 } |
| 20 </style> | 20 </style> |
| 21 <script src="../../../transitions/resources/transition-test-helpers.js"></script
> | 21 <script src="../../../animations/resources/animation-test-helpers.js"></script> |
| 22 <script> | 22 <script> |
| 23 const expectedValues = [ | 23 const expectedValues = [ |
| 24 // [time, element-id, property, expected-value, tolerance] | 24 // [time, element-id, property, expected-value, tolerance] |
| 25 [0.5, 'box', 'opacity', 0.5, 0.1], | 25 [0.5, 'box', 'opacity', 0.5, 0.1], |
| 26 ]; | 26 ]; |
| 27 | 27 |
| 28 function setupTest() { | 28 function setupTest() { |
| 29 var box = document.getElementById('box'); | 29 var box = document.getElementById('box'); |
| 30 var shadowRoot = box.webkitCreateShadowRoot(); | 30 var shadowRoot = box.webkitCreateShadowRoot(); |
| 31 shadowRoot.innerHTML = '<content select="*:first-child"></content>'; | 31 shadowRoot.innerHTML = '<content select="*:first-child"></content>'; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 43 <!-- If this test pass, css transition will be started and --> | 43 <!-- If this test pass, css transition will be started and --> |
| 44 <!-- the css transition will be paused by using pauseAnimations. --> | 44 <!-- the css transition will be paused by using pauseAnimations. --> |
| 45 <div id="box" class="box" style="background: green;"> | 45 <div id="box" class="box" style="background: green;"> |
| 46 <div>Content</div> | 46 <div>Content</div> |
| 47 <div>New Content</div> | 47 <div>New Content</div> |
| 48 </div> | 48 </div> |
| 49 | 49 |
| 50 <div id="result"></div> | 50 <div id="result"></div> |
| 51 </body> | 51 </body> |
| 52 </html> | 52 </html> |
| OLD | NEW |