timothy_horton@apple.com | bd1cdca | 2015-04-03 06:37:15 +0000 | [diff] [blame] | 1 | <head> |
| 2 | <script> |
| 3 | window.onload = function () { |
| 4 | if (!window.testRunner) { |
| 5 | document.write("Test cannot be run manually."); |
| 6 | return; |
| 7 | } |
| 8 | |
| 9 | testRunner.waitUntilDone(); |
ddkilzer@apple.com | 683a516 | 2015-06-21 16:44:41 +0000 | [diff] [blame] | 10 | |
| 11 | // Prevent WebKit1 hangs by ensuring layout is up-to-date before resize. |
| 12 | setTimeout(function() { window.resizeTo(200, 200); }, 0); |
timothy_horton@apple.com | fb15874 | 2015-04-04 00:07:54 +0000 | [diff] [blame] | 13 | } |
timothy_horton@apple.com | bd1cdca | 2015-04-03 06:37:15 +0000 | [diff] [blame] | 14 | |
timothy_horton@apple.com | fb15874 | 2015-04-04 00:07:54 +0000 | [diff] [blame] | 15 | window.onresize = function () { |
ddkilzer@apple.com | 683a516 | 2015-06-21 16:44:41 +0000 | [diff] [blame] | 16 | if (!window.testRunner) { |
| 17 | return; |
| 18 | } |
| 19 | |
timothy_horton@apple.com | bd1cdca | 2015-04-03 06:37:15 +0000 | [diff] [blame] | 20 | internals.setUseFixedLayout(true); |
| 21 | internals.setFixedLayoutSize(400, 400); |
| 22 | |
timothy_horton@apple.com | fb15874 | 2015-04-04 00:07:54 +0000 | [diff] [blame] | 23 | testRunner.notifyDone(); |
timothy_horton@apple.com | bd1cdca | 2015-04-03 06:37:15 +0000 | [diff] [blame] | 24 | } |
| 25 | </script> |
| 26 | </head> |
| 27 | <body style="margin: 0;"> |
| 28 | <div style="width: 100%; height: 100%; position: absolute; background-color: green;"></div> |
| 29 | <div style="width: 50vw; height: 50vh; position: absolute; background-color: blue;"></div> |
ddkilzer@apple.com | 683a516 | 2015-06-21 16:44:41 +0000 | [diff] [blame] | 30 | </body> |