| <!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] --> |
| <html> |
| <head> |
| <title>This tests the case when visible and actionable content shows up and gets invisible right away.</title> |
| <script src="../../../../../resources/ui-helper.js"></script> |
| <style> |
| #tapThis { |
| width: 400px; |
| height: 400px; |
| border: 1px solid green; |
| } |
| |
| #willBecomeVisibleMomentarily { |
| display: none; |
| width: 100px; |
| height: 100px; |
| background-color: red; |
| } |
| </style> |
| <script> |
| async function test() { |
| if (!window.testRunner || !testRunner.runUIScript) |
| return; |
| if (window.internals) |
| internals.settings.setContentChangeObserverEnabled(true); |
| |
| testRunner.waitUntilDone(); |
| testRunner.dumpAsText(); |
| |
| await UIHelper.activateElement(tapThis); |
| } |
| </script> |
| </head> |
| <body onload="test()"> |
| <div id=tapThis>PASS if 'clicked' text is shown below.</div> |
| <div id=willBecomeVisibleMomentarily></div> |
| <div id=willBecomeVisible></div> |
| <pre id=result></pre> |
| <script> |
| tapThis.addEventListener("touchstart", function( event ) { |
| willBecomeVisibleMomentarily.style.display = "block"; |
| }, false); |
| |
| tapThis.addEventListener("mouseover", function( event ) { |
| willBecomeVisibleMomentarily.style.visibility = "hidden"; |
| }, false); |
| |
| willBecomeVisibleMomentarily.addEventListener("click", function( event ) { |
| result.innerHTML = "clicked willBecomeVisibleMomentarily"; |
| }, false); |
| |
| tapThis.addEventListener("click", function( event ) { |
| result.innerHTML = "clicked"; |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }, false); |
| </script> |
| </body> |
| </html> |