| Index: LayoutTests/fast/repaint/iframe-throttling-unthrottled.html
|
| diff --git a/LayoutTests/fast/repaint/iframe-throttling-unthrottled.html b/LayoutTests/fast/repaint/iframe-throttling-unthrottled.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d5049b46d8e7da6b91ce938e5c8decb0891d652b
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/repaint/iframe-throttling-unthrottled.html
|
| @@ -0,0 +1,35 @@
|
| +<!DOCTYPE html>
|
| +<!-- Check that a throttled iframe repaints itself when scrolled into view. -->
|
| +<style>
|
| +#frame
|
| +{
|
| + position: absolute;
|
| + top: 2000px;
|
| +}
|
| +</style>
|
| +
|
| +<script src="resources/text-based-repaint.js"></script>
|
| +<script>
|
| +window.testIsAsync = true;
|
| +
|
| +function repaintTest()
|
| +{
|
| + var frame = document.querySelector('#frame');
|
| + frame.scrollIntoView();
|
| + // The first animation frame after this one updates the scroll position and
|
| + // unthrottles the frame. The repainting of the iframe happens in the frame
|
| + // after that. Therefore, we must wait for two requestAnimationFrames to
|
| + // finish the test.
|
| + window.requestAnimationFrame(waitForRepaint);
|
| +}
|
| +
|
| +function waitForRepaint()
|
| +{
|
| + window.requestAnimationFrame(finishRepaintTest);
|
| +}
|
| +
|
| +window.addEventListener('load', runRepaintTest);
|
| +</script>
|
| +
|
| +<!-- Use sandboxing to allow rendering pipeline throtting. -->
|
| +<iframe id="frame" srcdoc="<style> body { background: green; } </style>" sandbox="" width="64" height="64"></iframe>
|
|
|