| <html> |
| <body> |
| <p>Test that passing "height=0,width=0" to window.open() results in default window size.</p> |
| <div id=result></div> |
| <script> |
| if (window.testRunner) { |
| testRunner.waitUntilDone(); |
| testRunner.dumpAsText(); |
| } |
| |
| var result = document.getElementById("result"); |
| |
| window.addEventListener("message", function (e) { |
| try { |
| var dimensions = JSON.parse(e.data); |
| if (dimensions[0] > 100 && dimensions[1] > 100) |
| result.innerHTML = "PASS"; |
| else |
| result.innerHTML = "FAIL: " + e.data; |
| } catch (ex) { |
| alert("FAIL: " + ex + " (" + e.data + ")"); |
| } |
| |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }, false); |
| |
| window.open("data:text/html,<script>opener.postMessage('[' + window.innerWidth + ',' + window.innerHeight + ']', '*'); window.close();<" + "/script>", "", "height=0,width=0"); |
| </script> |
| </body> |
| </html> |