| <!DOCTYPE html> |
| <script type="text/javascript"> |
| function go() { |
| if (window.testRunner) { |
| testRunner.waitUntilDone(); |
| } |
| // Wait a couple of frames for the animation inside the iframe to progress. |
| requestAnimationFrame(function() { |
| requestAnimationFrame(function() { |
| var iframe = document.getElementById("iframe"); |
| iframe.style.display = "block"; |
| var innerDoc = iframe.contentDocument; |
| var target = innerDoc.getElementById('target'); |
| |
| // If the animation has been running, then we expect "left" to be |
| // non-zero. |
| if (parseInt(getComputedStyle(target).left, 10) == 0) |
| document.write("PASS"); |
| else |
| document.write("FAIL"); |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.notifyDone(); |
| } |
| }); |
| }); |
| }; |
| </script> |
| <body onload="go()"> |
| <p> |
| Tests that children of a display:none iframe do not run animations. |
| </p> |
| <iframe id="iframe" style="display:none" src="resources/frame_with_animation.html"></iframe> |
| </body> |