| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>The green box should not disappear</title> |
| <style> |
| .box { |
| width: 400px; |
| background-color: green; |
| height: 0px; |
| opacity: 0.8; |
| transition: opacity 0.1s; |
| } |
| |
| body.changed .box { |
| opacity: 1; |
| } |
| |
| .content { |
| height: 200px; |
| width: 200px; |
| background-color: green; |
| } |
| </style> |
| <script> |
| if (window.testRunner) |
| testRunner.waitUntilDone(); |
| |
| window.addEventListener('load', () => { |
| |
| let box = document.getElementsByClassName('box')[0]; |
| box.addEventListener('transitionend', () => { |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }, false); |
| setTimeout(() => { |
| document.body.classList.add('changed'); |
| }, 0); |
| }, false); |
| </script> |
| </head> |
| <body> |
| <div class="box"> |
| <div class="content"></div> |
| </div> |
| </body> |
| </html> |