Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/compositing/composited-iframe-hidden.html |
| diff --git a/third_party/WebKit/LayoutTests/compositing/composited-iframe-hidden.html b/third_party/WebKit/LayoutTests/compositing/composited-iframe-hidden.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3c1a55eb260a7c722bf23234a2a66f2e455e65dd |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/compositing/composited-iframe-hidden.html |
| @@ -0,0 +1,43 @@ |
| +<!DOCTYPE html> |
| +<script src="../resources/run-after-layout-and-paint.js"></script> |
| +<div id="frameContainer"> |
| + <iframe src="./resources/composited-iframe-hidden-2.html"></iframe> |
| +</div> |
| +<script> |
| +function showDialog() { |
| + frameContainer.style.visibility = 'hidden'; |
| + popup.style.display = ''; |
| +} |
| + |
| +function hideDialog() { |
| + frameContainer.style.visibility = 'visible'; |
| + popup.style.display = 'none'; |
| +} |
| +</script> |
| +<div id="settings" onclick="showDialog();">Settings</div> |
| +<div id="popup" style="display: none;" onclick="hideDialog();"> |
| + Cancel |
| +</div> |
| +<p>To test manually, click on 'Settings' and then click on 'Cancel'. The iframe above should disappear (and all contents |
| +vanish) and then reappear and there should be no assert failure in debug builds. |
| +<script> |
| +// We were seeing assert failure when we hid and then re-showed the iframe due |
| +// to a stale graphics layer with an old invalidation posted by the animated |
| +// element. To prevent regression we hide and re-show the iframe, and hide again |
| +// to ensure the content is actually hidden. |
| +if (window.testRunner) |
| + testRunner.waitUntilDone(); |
| +runAfterLayoutAndPaint(function() { |
| + settings.click(); |
| + runAfterLayoutAndPaint(function() { |
| + popup.click(); |
|
chrishtr
2016/01/21 22:49:18
Instead of going through onclick, just set its sty
wkorman
2016/01/22 00:19:56
Done.
|
| + runAfterLayoutAndPaint(function() { |
| + settings.click(); |
| + if (window.testRunner) |
| + runAfterLayoutAndPaint(function() { |
| + testRunner.notifyDone(); |
| + }); |
| + }); |
| + }); |
| +}); |
| +</script> |