Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <script src="../resources/run-after-layout-and-paint.js"></script> | |
| 3 <div id="frameContainer"> | |
| 4 <iframe src="./resources/composited-iframe-hidden-2.html"></iframe> | |
| 5 </div> | |
| 6 <script> | |
| 7 function showDialog() { | |
| 8 frameContainer.style.visibility = 'hidden'; | |
| 9 popup.style.display = ''; | |
| 10 } | |
| 11 | |
| 12 function hideDialog() { | |
| 13 frameContainer.style.visibility = 'visible'; | |
| 14 popup.style.display = 'none'; | |
| 15 } | |
| 16 </script> | |
| 17 <div id="settings" onclick="showDialog();">Settings</div> | |
| 18 <div id="popup" style="display: none;" onclick="hideDialog();"> | |
| 19 Cancel | |
| 20 </div> | |
| 21 <p>To test manually, click on 'Settings' and then click on 'Cancel'. The iframe above should disappear (and all contents | |
| 22 vanish) and then reappear and there should be no assert failure in debug builds. | |
| 23 <script> | |
| 24 // We were seeing assert failure when we hid and then re-showed the iframe due | |
| 25 // to a stale graphics layer with an old invalidation posted by the animated | |
| 26 // element. To prevent regression we hide and re-show the iframe, and hide again | |
| 27 // to ensure the content is actually hidden. | |
| 28 if (window.testRunner) | |
| 29 testRunner.waitUntilDone(); | |
| 30 runAfterLayoutAndPaint(function() { | |
| 31 settings.click(); | |
| 32 runAfterLayoutAndPaint(function() { | |
| 33 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.
| |
| 34 runAfterLayoutAndPaint(function() { | |
| 35 settings.click(); | |
| 36 if (window.testRunner) | |
| 37 runAfterLayoutAndPaint(function() { | |
| 38 testRunner.notifyDone(); | |
| 39 }); | |
| 40 }); | |
| 41 }); | |
| 42 }); | |
| 43 </script> | |
| OLD | NEW |