| div.block { height: 400px; border: 1px solid black; margin:10px; } |
| window.onresize = function() { |
| document.getElementById('count1').innerHTML = resizecount; |
| Test how many resize events are emitted during page load and dynamic content generation. |
| Do not resize the page. It invalidates the test. |
| <p style="text-indent: 10px" id=result1> |
| Resize events (should be 0): <span id=count1>0</span> |
| testRunner.waitUntilDone(); |
| var el = document.createElement('div'); |
| el.setAttribute('class','block'); |
| document.getElementById('expandingblock').appendChild(el); |
| setTimeout(addBlock, 20); |
| // No resize events are acceptable. |
| result = '<p style="color: green">PASS'; |
| result = '<p style="color: red">FAIL'; |
| var resultElement = document.getElementById('result1') |
| resultElement.innerHTML += result; |