| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| </script> |
| <p>This test passes if opening modal dialogs is blocked and the corresponding calls return immediately with the expected values.</p> |
| <iframe sandbox="allow-scripts" |
| src="data:text/html,<script> |
| console.log('window.alert returned ' + alert('MESSAGE')); |
| </script>"></iframe> |
| <iframe sandbox="allow-scripts" |
| src="data:text/html,<script> |
| console.log('window.confirm returned ' + confirm('MESSAGE?')); |
| </script>"></iframe> |
| <iframe sandbox="allow-scripts" |
| src="data:text/html,<script> |
| console.log('window.prompt returned ' + prompt('MESSAGE:', 'DEFAULT')); |
| </script>"></iframe> |
| <iframe sandbox="allow-scripts" |
| src="data:text/html,<script> |
| console.log('window.print returned ' + print()); |
| </script>"></iframe> |
| <iframe sandbox="allow-scripts" |
| src="data:text/html,<script> |
| console.log('document.execCommand returned ' + document.execCommand('print', true, null)); |
| </script>"></iframe> |